Strategy · Pine Script v6 · On the chart

XAU/USD Enhanced Arbitrage Strategy

by harsh-official

This strategy calculates the cross-market ratio between gold and EURUSD alongside an ATR volatility percentage and a higher-timeframe daily SMA trend filter.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code107
Settings11inputs
LicenceNone stated
Last update1 year ago17 Aug 2025

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

XAU/USD Enhanced Arbitrage Strategy executes session-tailored entries across the Asian, London, and New York sessions using RSI, ADX, and MACD momentum conditions aligned with the primary trend. Position exits are managed with an ATR-based bracket that sets a 1.5 ATR stop loss and a 3.0 ATR profit target. It draws strategy orders directly on the price chart.

Details

Published by

harsh-official on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Trend, Volatility & bands, Sessions & time, Oscillators & momentum

Markets

Gold

Timeframes

M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
0000-0800sessionAsian Sessioninput_asian_start
0800-1600sessionLondon Sessioninput_london_start
1200-2000sessionNY Sessioninput_ny_start
ATR Lengthint14input_atr_length
Volatility Threshold (%)float1.5input_vol_threshold
Z-Score Thresholdfloat-1.5input_z_score
RSI Lengthint14rsi_length
RSI Overboughtint65rsi_ob
RSI Oversoldint35rsi_os
ADX Thresholdint25adx_threshold
Trend Filter Lengthint50trend_filter_length
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

106 stars

This strategy enters long positions during a specified trading session when multiple technical indicators align. It executes a buy order when the low drops below the lower Bollinger Band while RSI and ADX exceed configurable threshold values, price closes abov

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band + RSI + ADX + MACD
1 stars

MTF Confluence Strategy is a Pine Script strategy that generates long and short signals based on Supertrend flips on the chart timeframe confirmed by Supertrend on a higher timeframe. Signals require ADX above a threshold for trending conditions and optional v

Strategy v6 TrendOscillators & momentum
Updated 3 months ago · None stated GitHub repository of MTF Confluence Strategy

Momentum Rider DAILY FINAL

by greenpeas007
58 stars

This strategy combines exponential moving averages (EMA 9, 21, 50), RSI, MACD, and Supertrend indicators to enter long positions. It triggers trades using six dynamic setups based on momentum breakouts, EMA crossovers, and pullbacks. Position sizing is compute

Strategy v6 TrendOscillators & momentum Repaints
Updated 4 months ago · Custom licence GitHub repository of Momentum Rider DAILY FINAL
57 stars

This strategy identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of Market Structure MACD 4H + Trailing
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers