OPEN-SOURCE SCRIPT

Precision Momentum Scalper

136
//version=5
indicator("Precision Momentum Scalper", overlay=true)

// Inputs
emaFastLen = input.int(50, title="EMA Fast")
emaSlowLen = input.int(200, title="EMA Slow")
rsiLen = input.int(14, title="RSI Length")
macdFast = input.int(12, title="MACD Fast")
macdSlow = input.int(26, title="MACD Slow")
macdSignal = input.int(9, title="MACD Signal")

// EMA
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)

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

// MACD
[macdLine, signalLine, _] = ta.macd(close, macdFast, macdSlow, macdSignal)

// Volume Spike
vol = volume
volAvg = ta.sma(volume, 5)

// Buy and Sell Conditions
longCond = close > emaFast and emaFast > emaSlow and rsi > 30 and macdLine > signalLine and volume > volAvg
shortCond = close < emaFast and emaFast < emaSlow and rsi < 70 and macdLine < signalLine and volume > volAvg

plotshape(longCond, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="Buy")
plotshape(shortCond, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")

plot(emaFast, title="EMA 50", color=color.orange)
plot(emaSlow, title="EMA 200", color=color.blue)

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.