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が提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。