This ProBuilder script is designed to identify bullish breakout patterns over a specified range of candlesticks, considering a minimum retracement. The code checks if the current candle’s close is higher than the close of a past candle within a defined range, following a retracement that exceeds a specified minimum.
mincandles = 3
maxcandles = 20
minPoints = 20
for i = mincandles to maxcandles
if close > close[i] and close[1] < close[i] and min(close, close[i]) - lowest[max(1, i)](low) > minPoints * pointsize then
drawarrowup(barindex, low) coloured("green")
drawsegment(barindex, min(close, close[i]), barindex[i], min(close, close[i])) style(dottedline2)
break
endif
next
return
The code snippet above performs the following steps:
This script is useful for traders who are looking for potential bullish entries after a price retracement, using historical data to validate the strength of the current price movement.
Check out this related content for more information:
https://www.prorealcode.com/topic/last-few-candles-in-loop/#post-212591
Visit Link