0% found this document useful (0 votes)
11 views1 page

کودپپپپپ

Hgg

Uploaded by

afghanfreelance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

کودپپپپپ

Hgg

Uploaded by

afghanfreelance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=5

indicator("Advanced Trading Strategy with Enhanced Features", overlay=true)

// --- ‫ سیگنال‌های اولیه‬---


ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
earlyBullSignal = ta.crossover(ema50, ema200)
earlyBearSignal = ta.crossunder(ema50, ema200)

// --- ‫ شا خص‬RSI ---


rsi14 = ta.rsi(close, 14)

// ---‫ ت رک ی ب‬MACD ‫ و‬RSI ---


[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
combinedSignal = ta.crossover(macdLine, signalLine) and rsi14 > 50

// --- ‫ حجم معامالت‬---


avgVolume = ta.sma(volume, 50)
highVolume = volume > avgVolume

// --- ‫ حمایت و مقاومت‬---


support = ta.lowest(low, 20)
resistance = ta.highest(high, 20)

// --- ‫ فیلتر سیگنال‌ها‬---


filteredBullSignal = earlyBullSignal and highVolume and close > support
filteredBearSignal = earlyBearSignal and highVolume and close < resistance

// --- Parabolic SAR ---


psar = ta.sar(0.02, 0.2)
trendUp = close > psar
trendDown = close < psar

confirmedBullSignal = filteredBullSignal and trendUp


confirmedBearSignal = filteredBearSignal and trendDown

// --- ‫ نمایش سیگنال‌ها‬---


plotshape(confirmedBullSignal, style=shape.labelup, location=location.belowbar,
color=color.green, size=size.small, title="Buy")
plotshape(confirmedBearSignal, style=shape.labeldown, location=location.abovebar,
color=color.red, size=size.small, title="Sell")

// --- ‫ تعریف هشدارها‬---


alertcondition(confirmedBullSignal, title="Buy Signal", message="Buy Signal
Confirmed")
alertcondition(confirmedBearSignal, title="Sell Signal", message="Sell Signal
Confirmed")

You might also like