OPEN-SOURCE SCRIPT
MHIDa ATR-Distance Dip

WHAT IT DOES
ATR-Distance Dip is a visual context tool that measures how far price has stretched BELOW a reference moving average - not in fixed percentage points, but in ATR units (units of volatility). The same setting adapts by itself: in a calm market a small move already counts as far, in a choppy market price must travel further before it counts.
It draws:
- The reference average (EMA, default 20).
- A dynamic threshold line at (average - N x ATR), default N = 3.5.
- A shaded stretch zone between the average and the threshold.
- A small triangle when the previous bar closed below the threshold and the current bar closes back up (the first comeback candle after the drop).
- An optional alert on that comeback event, so you can be notified to LOOK at the chart.
HOW IT IS CALCULATED
- average = EMA(close, 20)
- ATR = simple moving average of the True Range over 14 bars (a plain SMA of the true range, not Wilder's smoothing)
- threshold = average - N x ATR (N adjustable, default 3.5; a sensible exploratory range is 2.5 / 3.5 / 4.5)
- highlight condition (evaluated on closed bars): previous close below the previous threshold AND current close above the previous close.
WHY ATR INSTEAD OF A FIXED PERCENTAGE
A fixed distance like 5% below the average means different things in quiet and in volatile regimes. Measuring the stretch in ATR units keeps the meaning consistent: 3.5 ATR below the average is unusually stretched both in slow and in fast markets, because the yardstick itself follows current volatility.
HOW TO USE IT
Add it to a standard candlestick chart. Watch the shaded zone: when price falls below the threshold line, the market is unusually stretched below its average for the current volatility regime. The triangle marks only the first attempt to come back (a close above the previous close), which is where a chart reader may want to start paying attention. Adjust the average length, the ATR length and the multiple to your instrument and timeframe: the defaults are a starting point, not the one true configuration.
HONESTY NOTE
This is a context and chart-reading aid, not a trading system: it issues no entries, no exits and simulates no trades. Directional markers are drawn only on standard chart types. It is not financial advice. You always decide.
ATR-Distance Dip is a visual context tool that measures how far price has stretched BELOW a reference moving average - not in fixed percentage points, but in ATR units (units of volatility). The same setting adapts by itself: in a calm market a small move already counts as far, in a choppy market price must travel further before it counts.
It draws:
- The reference average (EMA, default 20).
- A dynamic threshold line at (average - N x ATR), default N = 3.5.
- A shaded stretch zone between the average and the threshold.
- A small triangle when the previous bar closed below the threshold and the current bar closes back up (the first comeback candle after the drop).
- An optional alert on that comeback event, so you can be notified to LOOK at the chart.
HOW IT IS CALCULATED
- average = EMA(close, 20)
- ATR = simple moving average of the True Range over 14 bars (a plain SMA of the true range, not Wilder's smoothing)
- threshold = average - N x ATR (N adjustable, default 3.5; a sensible exploratory range is 2.5 / 3.5 / 4.5)
- highlight condition (evaluated on closed bars): previous close below the previous threshold AND current close above the previous close.
WHY ATR INSTEAD OF A FIXED PERCENTAGE
A fixed distance like 5% below the average means different things in quiet and in volatile regimes. Measuring the stretch in ATR units keeps the meaning consistent: 3.5 ATR below the average is unusually stretched both in slow and in fast markets, because the yardstick itself follows current volatility.
HOW TO USE IT
Add it to a standard candlestick chart. Watch the shaded zone: when price falls below the threshold line, the market is unusually stretched below its average for the current volatility regime. The triangle marks only the first attempt to come back (a close above the previous close), which is where a chart reader may want to start paying attention. Adjust the average length, the ATR length and the multiple to your instrument and timeframe: the defaults are a starting point, not the one true configuration.
HONESTY NOTE
This is a context and chart-reading aid, not a trading system: it issues no entries, no exits and simulates no trades. Directional markers are drawn only on standard chart types. It is not financial advice. You always decide.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。