OPEN-SOURCE SCRIPT
Dynamic Grid Trend Reversals with alerts

Dynamic Grid Trend Reversals with alerts
OVERVIEW
This indicator finds pullbacks that are likely to snap back in the direction of the trend. It draws a volatility grid around a trend baseline and marks the moment price turns back toward the baseline. Signals only appear in the trend direction, and each one is graded by how far price stretched before turning.
CREDITS
This script is a modified version of Dynamic Grid Indicator [BigBeluga] by BigBeluga, Full credit goes to BigBeluga for the baseline, the volatility grid and the dashboard concept.
HOW IT WORKS
Baseline: a 150-period Hull Moving Average. It turns green while rising (uptrend) and red while falling (downtrend).
Grid: lines above (+1, +2, +3) and below (-1, -2, -3) the baseline, spaced by ATR. They widen in volatile markets and tighten in quiet ones.
Dashboard: shows where price sits on the grid right now.
SIGNALS
Buy (green ▲): the baseline is green, price has dipped below it, and a candle closes back above a lower grid line.
Sell (red ▼): the baseline is red, price has rallied above it, and a candle closes back below an upper grid line.
Each signal is graded by how far price stretched (wicks included) over the recent candles before it turned:
Reached ±1 → Buy / Sell
Reached ±2 → Buy Buy / Sell Sell
Reached ±3 or further → Must Buy / Must Sell
The further price stretches from its average, the stronger the pull back toward it tends to be.
HOW TO USE IT
Read the baseline colour first. Only look for buys when it's green and sells when it's red.
Wait for the signal. Signals print only after the candle closes, so they never repaint.
Use the grade to size your conviction. Must Buy / Must Sell signals come from the most stretched moves.
A natural profit target is the baseline itself, the "fair value" price is returning to. Place the stop beyond the extreme of the stretch.
Works best in trending or gently ranging markets. In very choppy conditions, raise the Minimum Bar Gap to filter noise.
ALERTS & OUTPUTS
Six alerts are included: Buy, Buy Buy, Must Buy, Sell, Sell Sell and Must Sell. Create them with "Once Per Bar Close". Each grade is also exposed as a 1/0 output in the Data Window, so you can use the signals in other tools and automations.
CHANGES FROM THE ORIGINAL
Signals filtered to the trend direction only: buys below a rising baseline, sells above a falling one.
Signals graded into three strengths by how far price stretched, using wicks over recent candles.
Signal labels show their grade (Buy / Buy Buy / Must Buy, Sell / Sell Sell / Must Sell).
Oscillator pane removed; everything is shown on the price chart.
Calculates on the full chart history instead of the last 3,000 candles.
Six graded alerts and six 1/0 outputs added for automation.
Non-repainting: signals are confirmed on candle close.
SETTINGS
Same defaults as the original: HMA 150, ATR 100, ATR step 1.6, 3 grid levels, proximity 0.5, minimum gap of 10 candles between signals. Colours, label sizes and dashboard position can be adjusted.
DISCLAIMER
This indicator is for educational purposes only and is not financial advice. No indicator is right every time. Always confirm signals with your own analysis and use proper risk management.
OVERVIEW
This indicator finds pullbacks that are likely to snap back in the direction of the trend. It draws a volatility grid around a trend baseline and marks the moment price turns back toward the baseline. Signals only appear in the trend direction, and each one is graded by how far price stretched before turning.
CREDITS
This script is a modified version of Dynamic Grid Indicator [BigBeluga] by BigBeluga, Full credit goes to BigBeluga for the baseline, the volatility grid and the dashboard concept.
HOW IT WORKS
Baseline: a 150-period Hull Moving Average. It turns green while rising (uptrend) and red while falling (downtrend).
Grid: lines above (+1, +2, +3) and below (-1, -2, -3) the baseline, spaced by ATR. They widen in volatile markets and tighten in quiet ones.
Dashboard: shows where price sits on the grid right now.
SIGNALS
Buy (green ▲): the baseline is green, price has dipped below it, and a candle closes back above a lower grid line.
Sell (red ▼): the baseline is red, price has rallied above it, and a candle closes back below an upper grid line.
Each signal is graded by how far price stretched (wicks included) over the recent candles before it turned:
Reached ±1 → Buy / Sell
Reached ±2 → Buy Buy / Sell Sell
Reached ±3 or further → Must Buy / Must Sell
The further price stretches from its average, the stronger the pull back toward it tends to be.
HOW TO USE IT
Read the baseline colour first. Only look for buys when it's green and sells when it's red.
Wait for the signal. Signals print only after the candle closes, so they never repaint.
Use the grade to size your conviction. Must Buy / Must Sell signals come from the most stretched moves.
A natural profit target is the baseline itself, the "fair value" price is returning to. Place the stop beyond the extreme of the stretch.
Works best in trending or gently ranging markets. In very choppy conditions, raise the Minimum Bar Gap to filter noise.
ALERTS & OUTPUTS
Six alerts are included: Buy, Buy Buy, Must Buy, Sell, Sell Sell and Must Sell. Create them with "Once Per Bar Close". Each grade is also exposed as a 1/0 output in the Data Window, so you can use the signals in other tools and automations.
CHANGES FROM THE ORIGINAL
Signals filtered to the trend direction only: buys below a rising baseline, sells above a falling one.
Signals graded into three strengths by how far price stretched, using wicks over recent candles.
Signal labels show their grade (Buy / Buy Buy / Must Buy, Sell / Sell Sell / Must Sell).
Oscillator pane removed; everything is shown on the price chart.
Calculates on the full chart history instead of the last 3,000 candles.
Six graded alerts and six 1/0 outputs added for automation.
Non-repainting: signals are confirmed on candle close.
SETTINGS
Same defaults as the original: HMA 150, ATR 100, ATR step 1.6, 3 grid levels, proximity 0.5, minimum gap of 10 candles between signals. Colours, label sizes and dashboard position can be adjusted.
DISCLAIMER
This indicator is for educational purposes only and is not financial advice. No indicator is right every time. Always confirm signals with your own analysis and use proper risk management.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。