#Скрипт ищет базы из 4 последних свечей, на любых уровнях ценцентов. #Cнять галочку Include Extended Session ##www.nyser.ru © def iDiff = 0.01; #максимальное отклонение в центах def iLowest = lowest(low,4); def iHighest = highest(high,4); def bBaseLow = if ((low[0]-iLowest)<=iDiff) and ((low[1]-iLowest)<=iDiff) and ((low[2]-iLowest)<=iDiff) and ((low[3]-iLowest)<=iDiff) then 1 else 0; def bBaseHigh = if ((iHighest-high[0])<=iDiff) and ((iHighest-high[1])<=iDiff) and ((iHighest-high[2])<=iDiff) and ((iHighest-high[3])<=iDiff) then 1 else 0; plot bBase = if bBaseLow then 1 else if bBaseHigh then 2 else 0; AssignBackgroundColor (if (bBase == 1) then Color.LIGHT_GREEN else if (bBase == 2) then Color.LIGHT_RED else Color.black); bBase.AssignValueColor (if (bBase > 0) then Color.black else Color.CURRENT);