2018-08-28 Список |
2018-08-27 Список |
Находит на графике свечную формацию Реверсивный разворот.
#Revers.Показывает паттерн «Реверсивный разворот»
def bSignalUp = high[1]>high[2] and close[1]>high[2] and open>high[1] and close<close[1];
def bSignalDown = high[1]<high[2] and close[1]<low[2] and open<low[1] and close>close[1];
plot up = if bSignalUp then high else double.NaN;
plot down = if bSignalDown then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
up.setDefaultColor(color.LIGHT_red);
down.setDefaultColor(color.LIGHT_green);
<strong>#Ищет базу на любых уровнях.</strong> #Cнять галочку Include Extended Session #Thinkorswim https://RadchenkoVY.com/TOS def iDiff = 0.00; #максимальное отклонение в центах def iBars = 4; #число баров для просмотра def iLowest = lowest(low,iBars); def iHighest = highest(high,iBars); def bBaseLow = fold Lbar = 0 to iBars with Ls=1 do if ((low[Lbar]-iLowest)<=iDiff) then Ls*1 else Ls*0; def bBaseHigh = fold Hbar = 0 to iBars with Hs=1 do if ((iHighest-high[Hbar])<=iDiff) then Hs*1 else Hs*0; plot bBase = if bBaseLow then 1 else if bBaseHigh then 2 else 100; AssignBackgroundColor (if (bBase == 1) then Color.LIGHT_GREEN else if (bBase == 2) then Color.LIGHT_RED else Color.black); bBase.AssignValueColor (if bBase <> 100 then Color.black else Color.CURRENT);
<strong>#Ищет базу на уровнях кратным 50 центам.</strong> #Cнять галочку Include Extended Session #Thinkorswim https://RadchenkoVY.com/TOS def iDiff = 0.00; #максимальное отклонение в центах def iBars = 4; #число баров для просмотра def iLowest = lowest(low,iBars); def iHighest = highest(high,iBars); def bBaseLow = fold Lbar = 0 to iBars with Lsumm=1 do if ((low[Lbar]-iLowest)<=iDiff) then Lsumm*1 else Lsumm*0; def bBaseHigh = fold Hbar = 0 to iBars with Hsumm=1 do if ((iHighest-high[Hbar])<=iDiff) then Hsumm*1 else Hsumm*0; def iFigureLow = fold FLbar = 1 to iBars+1 with FLsumm do if (low[FLbar] == (Floor(low[FLbar]*2))/2) then FLsumm+1 else FLsumm; def iFigureHigh = fold FHbar = 1 to iBars+1 with FHsumm do if (high[FHbar] == (Ceil(high[FHbar]*2))/2) then FHsumm+1 else FHsumm; plot bBase = if (bBaseLow and iFigureLow) then 1 else if (bBaseHigh and iFigureHigh) then 2 else 100; AssignBackgroundColor (if (bBase == 1) then Color.LIGHT_GREEN else if (bBase == 2) then Color.LIGHT_RED else Color.black); bBase.AssignValueColor (if bBase <> 100 then Color.black else Color.CURRENT);
2018-08-24 Список |
2018-08-23 Список |