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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.