Range detection
Forums › ProRealTime English forum › ProBuilder support › Range detection
- This topic has 8 replies, 5 voices, and was last updated 2 weeks ago by
Dodi54.
Viewing 9 posts - 1 through 9 (of 9 total)
-
-
11/11/2025 at 6:13 PM #253535
As its name says, it help detecting sideways market.
Range detection123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120DefParam DrawOnLastBarOnly = trueonce candleLow = lowonce candleHigh = highonce candleOpen = openonce candleClose = closeonce insideCandles = 1once RangeIndex = 0MyTR = max(Range,max(abs(high - close[1]),abs(low - close[1])))if high > candleHigh[1] and close <= candleHigh[1] thencandleHigh = highendifif low < candleLow[1] and close >= candleLow[1] thencandleLow = lowendifbreakoutCandle = close > candleHigh or close < candleLowbullishBreak = close > candleHigh[1] and insideCandles[1] >= (minLemgth+1)bearishBreak = close < candleLow[1] and insideCandles[1] >= (minLemgth+1)candleMiddle = (candleHigh + candleLow)/2FiltreBreakoutCandle1 = (Average[2](MyTR[0])>F*Average[20](MyTR[1]) and breakindex>=barindex-1)FiltreBreakoutCandle2 = 0FiltreBreakoutCandle3 = 0If insideCandles>=3 thenupside = insideCandles>=3 and summation[ceil((insideCandles+1)/2)](close>=candleMiddle)=ceil((insideCandles+1)/2)downside = insideCandles>=3 and summation[ceil((insideCandles+1)/2)](close<=candleMiddle)=ceil((insideCandles+1)/2)FiltreBreakoutCandle2 = upside or downsideFiltreBreakoutCandle3 = (close >= candleHigh[2] or close <= candleLow[2]) and insideCandles>=2endifif breakoutCandle or (filtre and ((FilteringMethod=1 and FiltreBreakoutCandle1) or (FilteringMethod=2 and FiltreBreakoutCandle2) or (FilteringMethod=3 and FiltreBreakoutCandle3))) then //(Average[2](MyTR[0])>F*Average[20](MyTR[1]) and breakindex>=barindex-1)) thenIf not breakoutCandle and (filtre and FilteringMethod=2 and FiltreBreakoutCandle2) thenif upside thencandleLow = lowest[ceil((insideCandles+1)/2)](low)candleHigh = candleHighcandleOpen = opencandleClose = closeinsideCandles = 1breakindex = barindexelsif downside thencandleLow = candleLowcandleHigh = highest[ceil((insideCandles+1)/2)](high)candleOpen = opencandleClose = closeinsideCandles = 1breakindex = barindexendifelsecandleLow = lowcandleHigh = highcandleOpen = opencandleClose = closeinsideCandles = 1breakindex = barindexendifIf insideCandles[1] >= (minLemgth) and insideCandles = 1 then //and $RangeStart[RangeIndex] = breakindex[1] thenIf close > candleHigh[1] thenDrawarrowup(Barindex, Low)Elsif close < candleLow[1] thenDrawarrowdown(Barindex, High)Endif//drawsegment($RangeStart[i],$RangeHigh[i],$RangeStart[i]+$RangeLength[i],$RangeHigh[i])style(dottedline1,2)coloured("blue",255)//drawsegment($RangeStart[i],$RangeLow[i],$RangeStart[i]+$RangeLength[i],$RangeLow[i])style(dottedline1,2)coloured("blue",255)EndifelseinsideCandles = insideCandles+1if insideCandles >= (minLemgth) thenIf $RangeStart[RangeIndex] = breakindex then$RangeLength[RangeIndex] = insideCandles$RangeHigh[RangeIndex] = candleHigh$RangeLow[RangeIndex] = candleLowElseRangeIndex = RangeIndex + 1$RangeStart[RangeIndex] = breakindex$RangeLength[RangeIndex] = insideCandles$RangeHigh[RangeIndex] = candleHigh$RangeLow[RangeIndex] = candleLowEndifdrawsegment(breakindex,candleHigh,barindex+1,candleHigh)style(dottedline1,2)coloured("orange",255)drawsegment(breakindex,candlelow,barindex+1,candlelow)style(dottedline1,2)coloured("orange",255)DRAWRECTANGLE(breakindex,candleHigh,barindex+1,candlelow)coloured("orange",20)bordercolor("orange",100)drawsegment(breakindex,(candleHigh+candlelow)/2,barindex+1,(candleHigh+candlelow)/2)style(dottedline1,2)coloured("orange",255)endifendifFin = Max(0,RangeIndex-($RangeStart[RangeIndex]=breakindex))If OnlyLastRange > 0 thenDebut = Max(0,Fin-OnlyLastRange+1+($RangeStart[RangeIndex]=breakindex))ElseDebut = 0EndifIf RangeIndex > 1 thenFor i = Debut to Fin dodrawsegment($RangeStart[i],$RangeHigh[i],$RangeStart[i]+$RangeLength[i],$RangeHigh[i])style(line,2)coloured("blue",255)drawsegment($RangeStart[i],$RangeLow[i],$RangeStart[i]+$RangeLength[i],$RangeLow[i])style(line,2)coloured("blue",255)DRAWRECTANGLE($RangeStart[i],$RangeHigh[i],$RangeStart[i]+$RangeLength[i],$RangeLow[i])coloured("grey",20)bordercolor(204,0,0,1)drawsegment($RangeStart[i],($RangeHigh[i]+$RangeLow[i])/2,$RangeStart[i]+$RangeLength[i],($RangeHigh[i]+$RangeLow[i])/2)style(dottedline1,2)coloured("blue",255)NextEndifreturn3 users thanked author for this post.
12/01/2025 at 1:25 PM #25412412/01/2025 at 2:02 PM #254125Hello en important le fichier Détection de portée.itf il fonctionne
1 user thanked author for this post.
12/04/2025 at 1:22 PM #25424612/04/2025 at 2:47 PM #25424912/07/2025 at 8:49 PM #254337Super indicateur, merci beaucoup
Vous l’utilisez tel quel sur ES et NQ, ou vous ajustez les variables (avec le filtrage) ? Est-ce que le principe reste le même sur tous les timeframes pour les breakout et fake breakout ?
Quel est l’indicateur que vous utilisez pour les trendlines sur la photo ?
Merci encore une fois
12/15/2025 at 5:47 PM #254561@LucasBest SVP Quel est l’indicateur que vous utilisez pour les trendlines sur la photo ? Merci
12/15/2025 at 8:24 PM #25456412/15/2025 at 8:39 PM #254565 -
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
Find exclusive trading pro-tools on
Similar topics: