Buonasera a tutti,
sarebbe possibile convertire questo codice tratto dalla piattaforma Tradingview in PRT??
study(“Top Bottom Indicator”,overlay=false)
per = input(14, title=”Bottom Period”)
loc = low < lowest(low[1], per) and low <= lowest(low[per], per)
bottom = barssince(loc)
plot(bottom,color=color.blue)
per2 = input(14, title=”Top Period”)
loc2 = high > highest(high[1], per2) and high >= highest(high[per2], per2)
top = barssince(loc2)
plot(top,color=color.red)
Buy = crossover(bottom,top)
Sell = crossunder(bottom,top)
plotshape(Buy,title=”Buy”, location=location.bottom, color=#008000, style=shape.arrowup, text=”Buy”)
plotshape(Sell,title=”Sell”,location=location.top, color=#FF0000, style=shape.arrowdown, text=”Sell”)
background = top < bottom ? #0000FF : top > bottom ? #FF0000 : na
bgcolor(color=background, transp=85)
alertcondition(Buy, title=”Buy Signal”, message=”Buy”)
alertcondition(Sell, title=”Sell Signal”, message=”Sell”)
Grazie