// Fahodi Generic Strategy Template // Generated from stocks.basem.ai //@version=5 strategy("Fahodi Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=5) rsi = ta.rsi(close, 14) sma50 = ta.sma(close, 50) sma200 = ta.sma(close, 200) atr = ta.atr(14) longCondition = close > sma50 and sma50 > sma200 and rsi > 50 and rsi < 70 exitCondition = close < sma50 or rsi > 80 if longCondition strategy.entry("Long", strategy.long) strategy.exit("Exit", "Long", stop=close - atr * 2) if exitCondition and strategy.position_size > 0 strategy.close("Long") plot(sma50, "SMA 50", color=color.orange) plot(sma200, "SMA 200", color=color.gray, linewidth=2)