Gold Volatility Regime Meter (cost-to-ATR)

WHAT IT DOES
This meter answers one practical question for gold (XAUUSD) traders: are trading costs small or large compared to how much gold is currently moving?
Spread and slippage on gold CFDs are roughly fixed in dollars (for example about 0.20 to 0.30 USD per ounce), while the typical hourly range changes a lot from one market regime to another. When gold moves only 2 to 4 USD per hour, a 0.30 USD round trip is close to 10% of a typical move. When gold moves 15 to 20 USD per hour, the same cost is close to 1%.
HOW IT WORKS
- Requests the H1 Average True Range from closed H1 bars, so the readings are the same on any chart timeframe and do not repaint.
- Takes the median of the last 500 H1 ATR values (about one month of trading) to describe the current regime instead of a single noisy bar.
- Divides your round-trip cost (spread + 2 x slippage, both set in the inputs to match your broker) by that median ATR.
- Colors: teal when cost/ATR is below the good level, orange in between, red above the bad level.
- Regime ON when the median H1 ATR is at or above the USD threshold (default 5). The background turns light red when the regime is OFF.
- A small table shows the current H1 ATR, the median, the round-trip cost, cost/ATR and the regime state. Two alert conditions fire when the regime switches ON or OFF.
WHY IT MAY MATTER
In our own research on 2017 to 2026 broker data, a simple H1 trend-following system on gold was roughly flat in years when the median H1 ATR was small (costs were a large share of each move) and did much better in years when it was large. That is one study, on one instrument, with one system. It does not mean any system will profit when the meter is ON. Use it as context, not as an entry signal.
HOW TO USE
- Set Typical spread and Slippage to what your broker actually charges.
- Use it on XAUUSD or other gold symbols. The USD threshold is designed for gold prices; on other instruments adjust it or read only the cost/ATR line.
- Typical use: reduce position size or pause short-term systems when the meter is red or OFF; review more aggressive settings only when it is teal and ON.
LIMITATIONS
- Costs on your account may differ (commissions, swaps, wider spreads around news and the daily rollover).
- ATR describes range, not direction. A high-volatility regime can also produce large losses.
- Past behavior of volatility regimes does not guarantee future behavior.
This script is for research and education. It is not financial advice and makes no promise of profit.
This meter answers one practical question for gold (XAUUSD) traders: are trading costs small or large compared to how much gold is currently moving?
Spread and slippage on gold CFDs are roughly fixed in dollars (for example about 0.20 to 0.30 USD per ounce), while the typical hourly range changes a lot from one market regime to another. When gold moves only 2 to 4 USD per hour, a 0.30 USD round trip is close to 10% of a typical move. When gold moves 15 to 20 USD per hour, the same cost is close to 1%.
HOW IT WORKS
- Requests the H1 Average True Range from closed H1 bars, so the readings are the same on any chart timeframe and do not repaint.
- Takes the median of the last 500 H1 ATR values (about one month of trading) to describe the current regime instead of a single noisy bar.
- Divides your round-trip cost (spread + 2 x slippage, both set in the inputs to match your broker) by that median ATR.
- Colors: teal when cost/ATR is below the good level, orange in between, red above the bad level.
- Regime ON when the median H1 ATR is at or above the USD threshold (default 5). The background turns light red when the regime is OFF.
- A small table shows the current H1 ATR, the median, the round-trip cost, cost/ATR and the regime state. Two alert conditions fire when the regime switches ON or OFF.
WHY IT MAY MATTER
In our own research on 2017 to 2026 broker data, a simple H1 trend-following system on gold was roughly flat in years when the median H1 ATR was small (costs were a large share of each move) and did much better in years when it was large. That is one study, on one instrument, with one system. It does not mean any system will profit when the meter is ON. Use it as context, not as an entry signal.
HOW TO USE
- Set Typical spread and Slippage to what your broker actually charges.
- Use it on XAUUSD or other gold symbols. The USD threshold is designed for gold prices; on other instruments adjust it or read only the cost/ATR line.
- Typical use: reduce position size or pause short-term systems when the meter is red or OFF; review more aggressive settings only when it is teal and ON.
LIMITATIONS
- Costs on your account may differ (commissions, swaps, wider spreads around news and the daily rollover).
- ATR describes range, not direction. A high-volatility regime can also produce large losses.
- Past behavior of volatility regimes does not guarantee future behavior.
This script is for research and education. It is not financial advice and makes no promise of profit.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.