بله
vhdalian

مشخصات معامله
قیمت در زمان انتشار:
۰.۰۰۳۸۹
توضیحات
//@version=5 indicator(title="شاخص قدرت نسبی جدید", shorttitle="NEW RSI", format=format.price, precision=2, timeframe="", timeframe_gaps=true) //////FGHtrading////// ma(source, length, type) => switch type "SMA" => ta.sma(source, length) "Bollinger Bands" => ta.sma(source, length) "EMA" => ta.ema(source, length) "SMMA (RMA)" => ta.rma(source, length) "WMA" => ta.wma(source, length) "VWMA" => ta.vwma(source, length) rsiLengthInput = input.int(14, minval=1, title="طول RSI", group="تنظیمات RSI") rsiSourceInput = input.source(close, "منبع", group="تنظیمات RSI") maTypeInput = input.string("SMA", title="نوع MA", options= , group="تنظیمات MA") maLengthInput = input.int(14, title="طول MA", group="تنظیمات MA") bbMultInput = input.float(2.0, minval=0.001, maxval=50, title="BB StdDev", group="تنظیمات MA") up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput) down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput) rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down)) rsiMA = ma(rsi, maLengthInput, maTypeInput) isBB = maTypeInput == "Bollinger Bands" plot(rsi, "RSI", color=#7E57C2,display=display.none) plot(rsiMA, "MA مبتنی بر RSI", color=color.yellow,display=display.none) rsiUpperBand = hline(70, "باند بالایی RSI", color=#787B86) hline(50, "باند میانی RSI", color=color.new(#787B86, 50)) rsiLowerBand = hline(30, "باند پایینی RSI", color=#787B86) fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="پر کردن پسزمینه RSI") bbUpperBand = plot(isBB ? rsiMA + ta.stdev(rsi, maLengthInput) * bbMultInput : na, title = "باند بالایی بولینگر", color=color.green) bbLowerBand = plot(isBB ? rsiMA - ta.stdev(rsi, maLengthInput) * bbMultInput : na, title = "باند پایینی بولینگر", color=color.green) x=input(defval = 36) rsinew=ta.linreg(rsi,x,0) rsiMAnew=ta.linreg(rsiMA,x,0) plot(rsinew, "NEW RSI", color=#7E57C2) plot(rsiMAnew, "MA مبتنی بر NEW RSI", color=color.yellow)