#Показывает уровни чашка с ручкой и треугольники, с учетом объема и тренда за 2 последних дня #Cнять галочку Include Extended Session #www.nyser.ru © def iHighest = highest(high,120)[5]+0.01; def iLowest = lowest(low,120)[5]-0.01; def Agg = AggregationPeriod.DAY; def bVolume = if (volume(getsymbol(),AggregationPeriod.DAY)>=300000) then 1 else 0; #trend three day def bDayUp0 = if (close(period = agg)[0]-open(period = agg)[0]>0) then 1 else 0; def bDayUp1= if (close(period = agg)[1]-open(period = agg)[1]>0) then 1 else 0; def bDayUp2= if (close(period = agg)[2]-open(period = agg)[2]>0) then 1 else 0; def bDayDown0= if (close(period = agg)[0]-open(period = agg)[0]<0) then 1 else 0; def bDayDown1= if (close(period = agg)[1]-open(period = agg)[1]<0) then 1 else 0; def bDayDown2= if (close(period = agg)[2]-open(period = agg)[2]<0) then 1 else 0; def bTrendUp = if (bDayUp0 and bDayUp1 and bDayUp2) then 1 else 0; def bTrendDown = if (bDayDown0 and bDayDown1 and bDayDown2) then 1 else 0; plot bType = if iHighest - close <= 0.05 and iHighest >= highest(high,6) and bTrendUp and bVolume then iHighest else if close - iLowest <= 0.05 and iLowest <= lowest(low,6) and bTrendDown and bVolume then iLowest else 1000; AssignBackgroundColor (if iHighest - close <= 0.02 and iHighest >= highest(high,6) and bTrendUp and bVolume then color.GREEN else if close - iLowest <= 0.02 and iLowest <= lowest(low,6) and bTrendDown and bVolume then color.RED else color.BLACK);