غابا۸۸
ghaba8

مشخصات معامله
قیمت در زمان انتشار:
۰.۰۵۸۹۲
توضیحات
//@version=6
strategy("اسکالپر سریع - سوپرترند، EMA و RSI",
overlay=true,
initial_capital=1000,
pyramiding=0,
commission_type=strategy.commission.percent,
commission_value=0.05,
process_orders_on_close=true)
// ───── ورودیها ─────
emaFastLen = input.int(9, "EMA سریع")
emaSlowLen = input.int(21, "EMA کند")
emaTrendLen = input.int(200, "EMA روند")
atrLen = input.int(7, "ATR سوپرترند")
factor = input.float(2.0, "ضریب سوپرترند", step=0.1)
rsiLen = input.int(14, "RSI")
rsiBuy = input.int(52, "RSI خرید")
rsiSell = input.int(48, "RSI فروش")
atrSL = input.float(1.5, "حد ضرر ATR", step=0.1)
rr1 = input.float(1.0, "نسبت ریسک به بازده هدف اول", step=0.1)
rr2 = input.float(2.0, "نسبت ریسک به بازده هدف دوم", step=0.1)
// ───── اندیکاتورها ─────
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
emaTrend = ta.ema(close, emaTrendLen)
rsi = ta.rsi(close, rsiLen)
= ta.supertrend(factor, atrLen)
atr = ta.atr(atrLen)
// ───── روند ─────
bullTrend = close > emaTrend
bearTrend = close < emaTrend
// جهت سوپرترند:
// direction < 0 = صعودی
// direction > 0 = نزولی
bullST = direction < 0
bearST = direction > 0
// ───── سیگنالها ─────
buySignal =
bullTrend and
bullST and
emaFast > emaSlow and
rsi > rsiBuy and
ta.crossover(emaFast, emaSlow)
sellSignal =
bearTrend and
bearST and
emaFast < emaSlow and
rsi < rsiSell and
ta.crossunder(emaFast, emaSlow)
// ───── ورودها ─────
if buySignal
strategy.entry("خرید", strategy.long)
if sellSignal
strategy.entry("فروش", strategy.short)
// ───── حد سود / حد ضرر خرید ─────
longSL = strategy.position_avg_price - atr * atrSL
longTP1 = strategy.position_avg_price + atr * atrSL * rr1
longTP2 = strategy.position_avg_price + atr * atrSL * rr2
strategy.exit("خرید هدف اول", "خرید",
stop=longSL,
limit=longTP1,
qty_percent=50)
strategy.exit("خرید هدف دوم", "خرید",
stop=longSL,
limit=longTP2,
qty_percent=50)
// ───── حد سود / حد ضرر فروش ─────
shortSL = strategy.position_avg_price + atr * atrSL
shortTP1 = strategy.position_avg_price - atr * atrSL * rr1
shortTP2 = strategy.position_avg_price - atr * atrSL * rr2
strategy.exit("فروش هدف اول", "فروش",
stop=shortSL,
limit=shortTP1,
qty_percent=50)
strategy.exit("فروش هدف دوم", "فروش",
stop=shortSL,
limit=shortTP2,
qty_percent=50)
// ───── ترسیم ─────
plot(emaFast, "EMA 9")
plot(emaSlow, "EMA 21")
plot(emaTrend, "EMA 200")
plot(supertrend, "سوپرترند")
plotshape(buySignal,
title="خرید",
style=shape.labelup,
location=location.belowbar,
text="خرید")
plotshape(sellSignal,
title="فروش",
style=shape.labeldown,
location=location.abovebar,
text="فروش")
// ───── هشدارها ─────
alertcondition(buySignal,
title="سیگنال خرید",
message="سیگنال خرید شناسایی شد")
alertcondition(sellSignal,
title="سیگنال فروش",
message="سیگنال فروش شناسایی شد")
strategy("اسکالپر سریع - سوپرترند، EMA و RSI",
overlay=true,
initial_capital=1000,
pyramiding=0,
commission_type=strategy.commission.percent,
commission_value=0.05,
process_orders_on_close=true)
// ───── ورودیها ─────
emaFastLen = input.int(9, "EMA سریع")
emaSlowLen = input.int(21, "EMA کند")
emaTrendLen = input.int(200, "EMA روند")
atrLen = input.int(7, "ATR سوپرترند")
factor = input.float(2.0, "ضریب سوپرترند", step=0.1)
rsiLen = input.int(14, "RSI")
rsiBuy = input.int(52, "RSI خرید")
rsiSell = input.int(48, "RSI فروش")
atrSL = input.float(1.5, "حد ضرر ATR", step=0.1)
rr1 = input.float(1.0, "نسبت ریسک به بازده هدف اول", step=0.1)
rr2 = input.float(2.0, "نسبت ریسک به بازده هدف دوم", step=0.1)
// ───── اندیکاتورها ─────
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
emaTrend = ta.ema(close, emaTrendLen)
rsi = ta.rsi(close, rsiLen)
= ta.supertrend(factor, atrLen)
atr = ta.atr(atrLen)
// ───── روند ─────
bullTrend = close > emaTrend
bearTrend = close < emaTrend
// جهت سوپرترند:
// direction < 0 = صعودی
// direction > 0 = نزولی
bullST = direction < 0
bearST = direction > 0
// ───── سیگنالها ─────
buySignal =
bullTrend and
bullST and
emaFast > emaSlow and
rsi > rsiBuy and
ta.crossover(emaFast, emaSlow)
sellSignal =
bearTrend and
bearST and
emaFast < emaSlow and
rsi < rsiSell and
ta.crossunder(emaFast, emaSlow)
// ───── ورودها ─────
if buySignal
strategy.entry("خرید", strategy.long)
if sellSignal
strategy.entry("فروش", strategy.short)
// ───── حد سود / حد ضرر خرید ─────
longSL = strategy.position_avg_price - atr * atrSL
longTP1 = strategy.position_avg_price + atr * atrSL * rr1
longTP2 = strategy.position_avg_price + atr * atrSL * rr2
strategy.exit("خرید هدف اول", "خرید",
stop=longSL,
limit=longTP1,
qty_percent=50)
strategy.exit("خرید هدف دوم", "خرید",
stop=longSL,
limit=longTP2,
qty_percent=50)
// ───── حد سود / حد ضرر فروش ─────
shortSL = strategy.position_avg_price + atr * atrSL
shortTP1 = strategy.position_avg_price - atr * atrSL * rr1
shortTP2 = strategy.position_avg_price - atr * atrSL * rr2
strategy.exit("فروش هدف اول", "فروش",
stop=shortSL,
limit=shortTP1,
qty_percent=50)
strategy.exit("فروش هدف دوم", "فروش",
stop=shortSL,
limit=shortTP2,
qty_percent=50)
// ───── ترسیم ─────
plot(emaFast, "EMA 9")
plot(emaSlow, "EMA 21")
plot(emaTrend, "EMA 200")
plot(supertrend, "سوپرترند")
plotshape(buySignal,
title="خرید",
style=shape.labelup,
location=location.belowbar,
text="خرید")
plotshape(sellSignal,
title="فروش",
style=shape.labeldown,
location=location.abovebar,
text="فروش")
// ───── هشدارها ─────
alertcondition(buySignal,
title="سیگنال خرید",
message="سیگنال خرید شناسایی شد")
alertcondition(sellSignal,
title="سیگنال فروش",
message="سیگنال فروش شناسایی شد")
منتخب سردبیر
مشاهده بیشتردستیار هوشمند ارز دیجیتال
ترمینال ترید بایتیکل نرمافزار جامع ترید و سرمایهگذاری در بازار ارز دیجیتال است و امکاناتی مانند دورههای آموزشی ترید و سرمایهگذاری، تریدینگ ویو بدون محدودیت، هوش مصنوعی استراتژی ساز ترید، کلیه دادههای بازارهای مالی شامل دادههای اقتصاد کلان، تحلیل احساسات بازار، تکنیکال و آنچین، اتصال و مدیریت حساب صرافیها و تحلیلهای لحظهای را برای کاربران فراهم میکند.

