bonjour voici 2 itf: un pour les FVG avec les 50% en pointillé qui sont tres souvent nettoyés, et un autre qui montre une ligne des 50% de chaque bougie. Elle disparait quand elle est touchée. Qui pourrait modifier le paarmetrage pour que les 50% du FVG affiche une ligne continue qui disaprait quand elle est touchée? Merci d’avance.
50% de chaque bougie ————————————————————-
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(250,0,250)style(line, 1)
endif
lo=min(lo,low[i])
hi=max(hi,high[i])
next
endif
return Mid
FVG ———————————————————–
//@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(“grey”,155)FillColor(0,0,250)style(dottedline, 1)
Median=prevHigh+(Low-prevHigh)/2
DrawSegment(BarIndex-fvgLookback,Median,BarIndex,Median)Coloured(“yellow”)style(line, 2)
//DrawText(“#Median#”,BarIndex-1,Median,dialog,bold,12)
EndIf
If bearishFVG then
DrawRectangle(BarIndex,High,(BarIndex-fvgLookback),prevLow)Coloured(“grey”,155)FillColor(0,0,250)style(dottedline, 1)
Median=High+(prevLow-High)/2
DrawSegment(BarIndex-fvgLookback,Median,BarIndex,Median)Coloured(“yellow”)style(line, 2)
//DrawText(“#Median#”,BarIndex-1,Median,dialog,bold,12)
EndIf
Return