OPEN-SOURCE SCRIPT

High Accuracy Trading Indicator

//version=5
indicator("High Accuracy Trading Indicator", overlay=true)

// تنظیمات پارامترها
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
maLength = input.int(20, title="Moving Average Length")
volumeThreshold = input.float(1.5, title="Volume Threshold Multiplier")

// محاسبه RSI
rsiValue = ta.rsi(close, rsiLength)

// محاسبه مووینگ اوریج
maValue = ta.sma(close, maLength)

// محاسبه حجم میانگین
avgVolume = ta.sma(volume, maLength)
highVolume = volume > avgVolume * volumeThreshold

// شرایط خرید و فروش
buySignal = (rsiValue < rsiOversold) and (close > maValue) and highVolume
sellSignal = (rsiValue > rsiOverbought) and (close < maValue) and highVolume

// نمایش سیگنال‌ها
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

// رسم مووینگ اوریج
plot(maValue, color=color.blue, title="Moving Average")

// هشدار صوتی
alertcondition(buySignal, title="Buy Alert", message="Buy Signal Detected!")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal Detected!")

Aviso legal