Three-bar reversal is a powerful pattern for day trading. The setup looks for a few consecutive red candlesticks and the final bar being a green candle closing higher than previous bars.
Here is an example:
Below is the code to identify bullish trigger bar in the Three Bar Reversal pattern. It also comes with an alert system.
# Three-Bar Reversal Indicator
# Found in the thinkScript Archive
# Alert added by WalkingBallista
def TBRup = close > open and close < close and close < close and close < close;
plot bullish = if TBRup then high else Double.NaN;
alert(bullish,"TBR Up", alert.Bar,sound.ding);
If you would like to look for bearish trigger bar in this pattern, you can insert the following code into that indicator.
def TBRdown = close < open and close > close and close > close and close > close;
plot bearish = if TBRdown then low else Double.NaN;
alert(bearish,"TBR Down", alert.Bar, sound.ding);
The script was posted on the thinkScript Lounge Archive. It did not mention who created the indicator.