Bonjour à tous,
ci dessous le code de l’indicateur Pin Bar detection de tradingview, si quelqu’un sait comment le traduire en PRT, je voudrais en faire un algo automatique.
je l’utilise sur ut H1/h4 très efficace pour prévoir les retournements de tendance.
Bonne journée à tous.
Ci-dessous:
//@version=2
study(“PIN BAR INDICATOR”,overlay=true)
//PIN BAR
body = abs(close-open)
upshadow = open>close?(high-open):(high-close)
downshadow = open>close?(close-low):(open-low)
pinbar_h = close[1]>open[1]?(body[1]>body?(upshadow>0.5*body?(upshadow>2*downshadow?1:0):0):0):0
pinbar_l = open[1]>close[1]?(body[1]>body?(downshadow>0.5*body?(downshadow>2*upshadow?1:0):0):0):0
plotshape(pinbar_h,style=shape.triangledown,color=red)
plotshape(pinbar_l,style=shape.triangleup,color=lime,location=location.belowbar)
plotchar(pinbar_h,text=”BEARISH PINBAR”,char=””,color=red)
plotchar(pinbar_l,text=”BULLISH PINBAR”,char=””,color=lime,location=location.belowbar)
Voilà le code de cet indicateur de détection de Pinbar convertit pour ProRealTime:
body = abs(close-open)
if open>close then
upshadow = (high-open)
else
upshadow=(high-close)
endif
if open>close then
downshadow =(close-low)
else
downshadow =(open-low)
endif
pinbarh=0
if close[1]>open[1] then
if(body[1]>body) then
if (upshadow>0.5*body) then
if(upshadow>2*downshadow) then
pinbarh = 1
endif
endif
endif
endif
pinbarl=0
if open[1]>close[1] then
if (body[1]>body) then
if (downshadow>0.5*body) then
if (downshadow>2*upshadow) then
pinbarl =1
endif
endif
endif
endif
if pinbarh then
drawarrowdown(barindex,high)
endif
if pinbarl then
drawarrowup(barindex,low)
endif
return
Bonjour Nicolas,
Un grand merci pour votre aide 🙂