Does this make sense for 3 bar down (bearish) indicator?
Code:
# 3 Bar Down
def PatternPlotDown =
IsUp[3] and
IsUp[2] and
IsUp[1] and
IsDown[0] and
low[1] > close[0];
plot arrowDown = arrows and PatternPlotDown;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetDefaultColor(GetColor(0));
I don't think so the middle candle is the highest usually counting the wick, this is a fractal candle indicator for reversals. The Fibonacci Indicator with Fractals is one of the scripts that Sam4Cok@Samer800 transcribed uses the same candle pattern
The three bar reversal pattern is a significant signal in technical analysis, often used by traders to identify potential trend reversals. It typically consists of three consecutive bars on a price chart, indicating a shift from a prevailing trend to a new direction. This pattern is characterized by the first bar representing the current trend, followed by a second bar indicating a potential reversal, and finally confirmed by the third bar, which typically closes beyond the high or low of the first bar, signaling a reversal. Traders often use this pattern to make informed decisions about entering or exiting positions in the market.
The setup looks for a few consecutive red candlesticks and the final bar being a green candle closing higher than previous bars.
Below is the code to identify bullish trigger bar in the Three Bar Reversal pattern. It also comes with an alert system.
thinkScript Code
Rich (BB code):
# Three-Bar Reversal Indicator
# Found in the thinkScript Archive
# Alert added by WalkingBallista
# https://usethinkscript.com/d/187-three-bar-reversal-pattern-and-indicator-for-thinkorswim
def TBRup = close > open[1] and close[1] < close[2] and close[2] < close[3] and close[3] < close[4];
plot bullish = if TBRup then high else Double.NaN;
bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
alert(bullish,"TBR Up", alert.Bar,sound.ding);
Can this be tweaked to trigger a signal if it takes more than three candles to close over/under the first? Say, the third candle doesn't close above the first. Can it be tweaked to trigger on the first candle that does?
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
How do I get started?
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.