Infinity Algo ZZ
Infinity Algo ZZ
Periods = 40
Src = hl2
changeATR = true
trend = 1
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
// Peak Profit
İmport protradingart/pta_plot/6 as pp
pp.peakprofit(buySignal, sellSignal)
// Bar Colors
Var color barColor = na
İf (sellSignal)
barColor := color.red
else if (buySignal)
barColor := color.green
else
barColor := barColor[1]
barcolor(barColor)