OPEN-SOURCE SCRIPT

Meta5 Scalping Indicator

//version=5
indicator("Meta5 Scalping Indicator", shorttitle="MSI", overlay=true)

// Inputs for Moving Averages
fastLength = input.int(9, title="Fast EMA Length")
slowLength = input.int(21, title="Slow EMA Length")

// Inputs for RSI
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")

// Inputs for Scalping Conditions
atrLength = input.int(14, title="ATR Length")
atrMultiplier = input.float(1.5, title="ATR Multiplier")

// Calculations
fastEMA = ta.ema(close, fastLength)
slowEMA = ta.ema(close, slowLength)
rsi = ta.rsi(close, rsiLength)
atr = ta.atr(atrLength)

// Conditions for Buy and Sell Signals
bullishCondition = ta.crossover(fastEMA, slowEMA) and rsi < rsiOversold
bearishCondition = ta.crossunder(fastEMA, slowEMA) and rsi > rsiOverbought

// Stop Loss and Take Profit Levels
longStopLoss = close - (atr * atrMultiplier)
shortStopLoss = close + (atr * atrMultiplier)

// Plot Buy and Sell Signals
plotshape(bullishCondition, title="Buy Signal", style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0))
plotshape(bearishCondition, title="Sell Signal", style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0))

// Plot EMAs
plot(fastEMA, title="Fast EMA", color=color.blue)
plot(slowEMA, title="Slow EMA", color=color.orange)

// Background Color for Overbought and Oversold RSI
bgcolor(rsi > rsiOverbought ? color.new(color.red, 90) : rsi < rsiOversold ? color.new(color.green, 90) : na)
Breadth IndicatorsTrend AnalysisWave Analysis

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian