Forex High-Probability Pro — Strategy by Raghav118
By version
Performance Metrics
- Author: version
- Symbol: OANDA:XAUUSD
- Timeframe: 1 hour
- Net P&L: −4.09 USD (−0.41%)
- Win Rate: 40.1%
- Profit Factor: 0.958
- Max Drawdown: 25.03 USD (2.47%)
- Total Trades: 212
Description
//version=5strategy("Forex High-Probability Pro", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=15)// --- Inputs ---rsiLen = input.int(14, "RSI Length")emaFast = input.int(50, "Fast EMA")emaSlow = input.int(200, "Slow EMA (Trend)")// Overlap Session (IST: 17:30 to 21:30) - Sabse zyada volume isi time hota haisessionFilter = input.session("1730-2130", "Power Hour Session (IST)")isInSession = not na(time(timeframe.period, sessionFilter, "GMT+530"))// --- Indicators ---rsi = ta.rsi(close, rsiLen)ema50 = ta.ema(close, emaFast)ema200 = ta.ema(close, emaSlow)atr = ta.atr(14)// --- Logic Improvement ---// Buy: Trend Up + Price above 50 EMA + RSI not overbought + Active SessionlongCondition = close > ema200 and ta.crossover(close, ema50) and rsi 35 and isInSession// --- Dynamic Exit (Risk-Reward 1:1.5 for higher Win Rate) ---// Win rate badhane ke liye humne TP thoda chota kiya hai (1.5x ATR)if (longCondition and strategy.position_size == 0) strategy.entry("Buy", strategy.long) strategy.exit("Exit Buy", "Buy", stop=close - (atr * 2), limit=close + (atr * 3), comment="B")if (shortCondition and strategy.position_size == 0) strategy.entry("Sell", strategy.short) strategy.exit("Exit Sell", "Sell", stop=close + (atr * 2), limit=close - (atr * 3), comment="S")// --- Visuals ---plot(ema200, color=color.yellow, linewidth=2, title="Trend")plot(ema50, color=color.aqua, title="Signal Line")bgcolor(isInSession ? color.new(color.blue, 90) : na)