Bonjour je souhaiterai convertir le programme d’un indicateur qui s’utilise sur la plateforme tradingview. En effet en copiant la programmation sur prorealtime j’ai une erreur en ligne Study et boxp. Pouvez vous m’aider afin que je puisse utiliser l’indicateur sur la plateforme prorealtime, merci d’avance pour votre réponse.
Voici le programme en question :
//@version=4
Study(“Darvas Box Buy Sell”, overlay=true)
boxp = input(defval=5, title=”Length”, minval=1, maxval=500)
LL = lowest(low, boxp)
k1 = highest(high, boxp)
k2 = highest(high, boxp – 1)
k3 = highest(high, boxp – 2)
NH = valuewhen(high > k1[1], high, 0)
box1 = k3 < k2
TopBox = valuewhen(barssince(high > k1[1]) == boxp – 2 and box1, NH, 0)
BottomBox = valuewhen(barssince(high > k1[1]) == boxp – 2 and box1, LL, 0)
plot(TopBox, linewidth=3, color=#00FF00, title=”TBbox”)
plot(BottomBox, linewidth=3, color=#FF0000, title=”BBbox”)
Buy = crossover(close, TopBox)
Sell = crossunder(close, BottomBox)
alertcondition(Buy, title=”Buy Signal”, message=”Buy”)
alertcondition(Sell, title=”Sell Signal”, message=”Sell”)
plotshape(Buy, style=shape.labelup, location=location.belowbar, transp=0, color=#00FF00, size=size.tiny, title=”Buy Signal”, text=”Buy”, textcolor=color.black)
plotshape(Sell, style=shape.labeldown, location=location.abovebar, transp=0, color=#FF0000, size=size.tiny, title=”Sell Signal”, text=”Sell”, textcolor=color.white)