DXY/XAU Volatility Mismatch & Retracement

Here is a complete Pine Script (Version 5) custom-built to execute the exact logic you described. It operates as a state machine that mathematically quantifies the "massive push" in the DXY, checks for the "sideways and low volume" anomaly on Gold (XAU/USD), and waits for the DXY retracement to fire the signal.
How the Logic Works:
DXY Impulse Detection (The Massive Push): The script fetches data from the DXY ticker and calculates its Average True Range (ATR). It measures the DXY's momentum over the last few bars and normalizes it against the ATR. If the move is excessively large, it triggers the first condition.
Gold Compression Filter (Low Volume / Sideways): Simultaneously, the script checks the primary chart (Gold). It requires the Average Directional Index (ADX) to be below 20 (indicating no trend) and the Relative Volume (RVol) to be below 0.70 (indicating low volume exhaustion).
The Pullback Trigger: Once the mismatch is locked in (State = Armed), the script stops looking for expansion and waits for the DXY to retrace. This is detected using a MACD cross-under or a price break below a short-term moving average on the DXY. The moment the DXY corrects, the indicator fires a BUY signal on your Gold chart.
How the Logic Works:
DXY Impulse Detection (The Massive Push): The script fetches data from the DXY ticker and calculates its Average True Range (ATR). It measures the DXY's momentum over the last few bars and normalizes it against the ATR. If the move is excessively large, it triggers the first condition.
Gold Compression Filter (Low Volume / Sideways): Simultaneously, the script checks the primary chart (Gold). It requires the Average Directional Index (ADX) to be below 20 (indicating no trend) and the Relative Volume (RVol) to be below 0.70 (indicating low volume exhaustion).
The Pullback Trigger: Once the mismatch is locked in (State = Armed), the script stops looking for expansion and waits for the DXY to retrace. This is detected using a MACD cross-under or a price break below a short-term moving average on the DXY. The moment the DXY corrects, the indicator fires a BUY signal on your Gold chart.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.