parametrer les FVG

Viewing 9 posts - 16 through 24 (of 24 total)
  • #246117
    JS
    #246119

    voila ça donne ça.

     

    //@version=5
    //indicator(“Fair Value Gap (FVG)”, overlay=true)

    // Parameters
    fvgLookback = 2//input.int(1, title=”Lookback (candle before and after)”, minval=1)

    // Données des bougies
    prevHigh = high[fvgLookback]
    prevLow = low[fvgLookback]
    nextHigh = high[0]
    nextLow = low[0]

    // Calcul du FVG
    bullishFVG = low > prevHigh
    bearishFVG = high < prevLow

    // Affichage des FVGs
    If bullishFVG then
    DrawRectangle((BarIndex-fvgLookback),prevHigh,BarIndex,low)Coloured(“YELLOW”,255)FillColor(0,0,250)
    Median=prevHigh+(Low-prevHigh)/2
    DrawSegment(BarIndex-fvgLookback,Median,BarIndex,Median)Coloured(“BLACK”)
    DrawText(“#Median#”,BarIndex-1,Median,dialog,bold,15)
    EndIf

    If bearishFVG then
    DrawRectangle(BarIndex,High,(BarIndex-fvgLookback),prevLow)Coloured(“YELLOW”,255)FillColor(0,0,250)
    Median=High+(prevLow-High)/2
    DrawSegment(BarIndex-fvgLookback,Median,BarIndex,Median)Coloured(“BLACK”)
    DrawText(“#Median#”,BarIndex-1,Median,dialog,bold,15)
    EndIf

    Return

    1 user thanked author for this post.
    avatar JS
    #246121

    Pour completer , l idée serait en effet de faire une extension à droite pour les 50% de FVG qui n’ont pas été atteint. Dés que le  niveaux est touché , il faudrait que le trait disparaisse.

    #246122
    JS

    Ce sera difficile, alors vous devrez travailler avec des « arrays »…
    Malheureusement, les « arrays » ne sont pas pour moi…

    #246130

    Voici un itf qui trace des traits vers la droite sur chaque 50% de bougies non retracées. Dés que le cours revient sur ce prix, le trait disparait. C’est possible de s’en inspirer pour l’ ITF du FVG

     

     

    defparam drawonlastbaronly=true

    Mid=low+(High-low)/2

    if(islastbarupdate) then
    lo=low[0]
    hi=high[0]

    for i=1 to 1000

    if (Mid[i]>hi or Mid[i]<lo) then
    DRAWRAY(barindex-i, Mid[i], barindex+5, Mid[i]) coloured(0,250,250)style(line, 2)
    endif
    lo=min(lo,low[i])
    hi=max(hi,high[i])
    next

    endif

    return Mid

    #246132
    JS

    Je m’y intéresserai demain…

    #246133

    sur le NQ visualisation des TP =50% de FVG

    #246145
    JS

    Ce que vous voulez comme dernière option n’est pas possible sans utiliser des « arrays »…

    #246151

    ok Merci JS

Viewing 9 posts - 16 through 24 (of 24 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login