Search This Blog

Monday, December 29, 2025

December 29, 2025 at 01:03PM m1

m1

SHIBA INU / TETHER COINEX:SHIBUSDT

//@version=5
strategy("Smart Confluence Strategy - Gemini Alpha", overlay=true)

// --- تنظیمات ورودی ---
emaLength = input.int(200, "EMA Length")
rsiLength = input.int(14, "RSI Length")
stMult = input.float(3.0, "SuperTrend Multiplier")
stPeriod = input.int(10, "SuperTrend Period")

// --- محاسبه اندیکاتورها ---
ema200 = ta.ema(close, emaLength)
rsi = ta.rsi(close, rsiLength)
= ta.supertrend(stMult, stPeriod)
= ta.bb(close, 20, 2)

// --- شرایط ورود (Buy) ---
// 1. قیمت بالای EMA 200 باشد
// 2. سوپرترند تغییر جهت به صعودی بدهد
// 3. RSI زیر 70 باشد (اشباع خرید نباشد)
longCondition = close > ema200 and direction < 0 and rsi < 70

// --- شرایط خروج (Sell) ---
// خروج زمانی که سوپرترند نزولی شود یا قیمت به باند بالایی بولینگر برخورد کند
exitCondition = direction > 0 or ta.crossover(close, upper)

// --- اجرای معاملات ---
if (longCondition)
strategy.entry("Long", strategy.long)

if (exitCondition)
strategy.close("Long")

// --- رسم روی چارت ---
plot(ema200, color=color.blue, title="EMA 200", linewidth=2)
plot(supertrend, color=direction < 0 ? color.green : color.red, title="SuperTrend")
plot(middle, color=color.gray, title="BB Middle")


No comments:

Post a Comment