OPEN-SOURCE SCRIPT
Trinity Reversal Pattern [AlgoAlpha]

🟠 OVERVIEW
Trinity Reversal Pattern [AlgoAlpha] identifies three-candle reversal structures and marks the price extreme associated with each detected setup. It is designed to separate structured reversal patterns from isolated bullish or bearish candles.
Each valid pattern receives a strength score based on the signal candle's body relative to the largest candle body within a selected lookback. The resulting reversal level remains active until price returns to it or the level reaches its selected expiry. An optional EMA trend filter can restrict patterns to the current trend direction.
🟠 CONCEPTS
🟠 FEATURES
🟠 HOW TO USE
🟠 CONCLUSION
Trinity Reversal Pattern [AlgoAlpha] combines three-candle reversal structures, relative candle-body strength, persistent reversal levels, and an optional EMA trend filter. It gives traders a structured way to identify reversal setups, compare their relative strength, and track whether their associated price extremes remain active or are revisited.
Trinity Reversal Pattern [AlgoAlpha] identifies three-candle reversal structures and marks the price extreme associated with each detected setup. It is designed to separate structured reversal patterns from isolated bullish or bearish candles.
Each valid pattern receives a strength score based on the signal candle's body relative to the largest candle body within a selected lookback. The resulting reversal level remains active until price returns to it or the level reaches its selected expiry. An optional EMA trend filter can restrict patterns to the current trend direction.
🟠 CONCEPTS
- Bullish Trinity Reversal — A three-candle structure that begins with two bearish candles. The middle candle trades below the first candle's low while remaining below its high. The third candle closes bullish and extends above the first candle's high. The lowest price across the three candles becomes the bullish reversal level.
- Bearish Trinity Reversal — The inverse structure. It begins with two bullish candles, with the middle candle trading above the first candle's high while remaining above its low. The third candle closes bearish and extends below the first candle's low. The highest price across the three candles becomes the bearish reversal level.
- Signal Strength — The absolute body size of the signal candle divided by the largest candle body found within the selected Strength Lookback, expressed as a percentage. A value near 100% means the signal candle is close to the largest recent body. This measures relative candle-body strength, not reversal probability or historical win rate.
- Reversal Level — The lowest point of a bullish three-candle pattern or the highest point of a bearish pattern. It marks the price extreme associated with the reversal structure and stays active until touched or expired.
- EMA Trend Filter — An optional directional filter based on fast and slow EMAs. A fast EMA cross above the slow EMA establishes the bullish state, while a cross below establishes the bearish state. When enabled, bullish patterns are accepted only during the bullish state and bearish patterns only during the bearish state.
🟠 FEATURES
- Trinity Reversal Signals — Bullish and bearish markers identify completed three-candle reversal structures directly on the chart.
- Reversal Levels — Each detected setup creates a level at its three-candle price extreme. Active levels extend forward and become dotted after they are touched or expire.
- Strength Labels — Active reversal levels can display their fixed signal strength percentage for quick comparison between setups.
- EMA Trend Gradient — Optional fast and slow EMA lines display the active trend state with a gradient between them.
🟠 HOW TO USE
- Watch for a bullish marker after a three-candle downside structure or a bearish marker after the corresponding upside structure.
- Compare the strength labels between signals. Higher values mean the signal candle has a larger body relative to the recent candle bodies in the selected lookback.
- Increase Minimum Signal Strength to remove patterns with weaker signal candles. Lower it to include a broader range of detected structures.
- Treat an active reversal level as the price extreme linked to its original setup. A later wick reaching that price counts as a touch and stops the level from remaining active.
- Adjust Level Expiry Bars to control how long untouched reversal levels remain active. Shorter values focus on recent setups, while longer values preserve levels for more bars.
- Enable the EMA Trend Filter when you want signals aligned with the current EMA state. In a bullish EMA state, only bullish Trinity patterns are accepted. In a bearish EMA state, only bearish patterns are accepted.
- Enable Confirm Signals on Close when you want a pattern to be confirmed only after its signal candle closes. Disabling it allows the current candle to produce a signal before the bar is complete, so the signal can change while the candle develops.
- Use alerts to track bullish or bearish Trinity signals, touches of active reversal levels, level expirations, and EMA trend crosses without continuously watching the chart.
🟠 CONCLUSION
Trinity Reversal Pattern [AlgoAlpha] combines three-candle reversal structures, relative candle-body strength, persistent reversal levels, and an optional EMA trend filter. It gives traders a structured way to identify reversal setups, compare their relative strength, and track whether their associated price extremes remain active or are revisited.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.