PIN BAR DETECTION TW

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #217988 quote
    FXtonio
    Participant
    New

    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)
    #218129 quote
    Nicolas
    Keymaster
    Master

    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
    pinbar-indicator.png pinbar-indicator.png
    #218161 quote
    FXtonio
    Participant
    New

    Bonjour Nicolas,

    Un grand merci pour votre aide 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

PIN BAR DETECTION TW


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
FXtonio @fxtonio Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by FXtonio
2 years, 7 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 07/21/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...