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

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明