OPEN-SOURCE SCRIPT

Flow_RSI_StochRSI_Volume

22
//version=5
indicator("Flow + RSI + StochRSI + Volume - Panel", overlay=false)

// ---- Inputs
cmfLen = input.int(20, "CMF Length", minval=2)
rsiLen = input.int(14, "RSI Length", minval=2)
srsiLen = input.int(14, "StochRSI Base Length", minval=2)
kLen = input.int(3, "%K Smoothing", minval=1)
dLen = input.int(3, "%D Smoothing", minval=1)

// ---- CMF (세력 유입)
rng = high - low
mfm = rng != 0 ? ((close - low) - (high - close)) / rng : 0.0
mfv = mfm * volume
cmf = ta.sma(mfv, cmfLen) / ta.sma(volume, cmfLen)

// ---- RSI
rsi = ta.rsi(close, rsiLen)

// ---- StochRSI (%K, %D)
rsiLL = ta.lowest(rsi, srsiLen)
rsiHH = ta.highest(rsi, srsiLen)
base = (rsiHH - rsiLL) != 0 ? (rsi - rsiLL) / (rsiHH - rsiLL) * 100.0 : 0.0
k = ta.sma(base, kLen)
d = ta.sma(k, dLen)

// ---- Volume (거래량)
vol = volume
vma20 = ta.sma(volume, 20)

// ---- Plots (색상 지정 없이 기본값 사용)
plot(cmf, title="CMF (Flow)")
hline(0, "CMF Zero")

plot(rsi, title="RSI")
hline(30, "RSI 30")
hline(50, "RSI 50")
hline(70, "RSI 70")

plot(k, title="StochRSI %K")
plot(d, title="StochRSI %D")

plot(vol, title="Volume", style=plot.style_histogram)
plot(vma20, title="Vol MA20")

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.