OPEN-SOURCE SCRIPT

Custom LuxAlgo-like Indicator

82
//version=5
indicator("Custom LuxAlgo-like Indicator", overlay=true)

// پارامترهای ورودی
length = input.int(14, title="Period", minval=1)
overbought_level = input(70, title="Overbought Level")
oversold_level = input(30, title="Oversold Level")

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

// سیگنال‌ها
buy_signal = ta.crossover(rsi_value, oversold_level)
sell_signal = ta.crossunder(rsi_value, overbought_level)

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

// رسم RSI
hline(overbought_level, "Overbought", color=color.red)
hline(oversold_level, "Oversold", color=color.green)
plot(rsi_value, title="RSI", color=color.blue, linewidth=2)

// اورلی‌ها (مثلاً میانگین متحرک)
ma_length = input.int(50, title="MA Length", minval=1)
ma_value = ta.sma(close, ma_length)
plot(ma_value, title="Moving Average", color=color.orange, linewidth=2)

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.