OPEN-SOURCE SCRIPT
XAUUSD 5m — NY Supertrend+RSI Optimizer (1:2 RR) — $240k/order

This strategy is built for XAUUSD (Gold) on the 5-minute timeframe, focusing exclusively on the New York trading session (08:00–17:00 NY time) — the most volatile and liquid hours of the day.
It combines a Supertrend trend filter with RSI momentum signals to identify high-probability entries, using a 1:2 risk–reward ratio for disciplined trade management.
🧠 Strategy Logic:
Buy Condition: RSI crosses above 55 while Supertrend indicates an uptrend
Sell Condition: RSI crosses below 45 while Supertrend indicates a downtrend
Session Filter: Trades only between 08:00 → 17:00 New York time
Risk/Reward: 1:2 (Take-Profit = 2× Stop-Loss distance from Supertrend line)
Position Size: $240,000 notional per order
Auto-Exit: Closes all trades at NY session end
⚡ Highlights:
Targets NY session volatility
Combines trend + momentum for cleaner entries
Strict 1:2 RR for consistent outcomes
Avoids overnight exposure
⚠️ Disclaimer:
This script is intended for educational and research purposes only.
Past performance is not indicative of future results.
Always forward-test on demo before using live capital.
It combines a Supertrend trend filter with RSI momentum signals to identify high-probability entries, using a 1:2 risk–reward ratio for disciplined trade management.
🧠 Strategy Logic:
Buy Condition: RSI crosses above 55 while Supertrend indicates an uptrend
Sell Condition: RSI crosses below 45 while Supertrend indicates a downtrend
Session Filter: Trades only between 08:00 → 17:00 New York time
Risk/Reward: 1:2 (Take-Profit = 2× Stop-Loss distance from Supertrend line)
Position Size: $240,000 notional per order
Auto-Exit: Closes all trades at NY session end
⚡ Highlights:
Targets NY session volatility
Combines trend + momentum for cleaner entries
Strict 1:2 RR for consistent outcomes
Avoids overnight exposure
⚠️ Disclaimer:
This script is intended for educational and research purposes only.
Past performance is not indicative of future results.
Always forward-test on demo before using live capital.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.