Work book

Wait 5 sec.

Work bookDOGS / TetherUSBINANCE:DOGSUSDTimpressivePers2252//@version=5 strategy("استراتژی ترکیبی RSI + EMA", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100) /// محاسبه EMA ها ema9 = ta.ema(close, 9) ema21 = ta.ema(close, 21) ema200 = ta.ema(close, 200) /// محاسبه RSI rsi = ta.rsi(close, 14) /// شروط خرید buySignal = (rsi < 30) and (ema9 > ema21) and (close > ema200) /// شروط فروش sellSignal = (rsi > 70) and (ema9 < ema21) and (close < ema200) /// ورود به معامله if (buySignal) strategy.entry("Buy", strategy.long) if (sellSignal) strategy.close("Buy") /// نمایش اندیکاتورها روی چارت plot(ema9, color=color.orange, title="EMA 9") plot(ema21, color=color.blue, title="EMA 21") plot(ema200, color=color.red, title="EMA 200") /// سیگنال‌های بصری (فلش) plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="Buy") plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")