OPEN-SOURCE SCRIPT

Momentum Day Trading Setup

76
//version=6
indicator("Momentum Day Trading Setup", overlay=true)

// VWAP
vwap = ta.vwap(close) // Fixed VWAP issue
plot(vwap, title="VWAP", color=color.blue, linewidth=2)

// EMA 9 & EMA 20
ema9 = ta.ema(close, 9)
ema20 = ta.ema(close, 20)

plot(ema9, title="EMA 9", color=color.green, linewidth=2)
plot(ema20, title="EMA 20", color=color.orange, linewidth=2)

// MACD
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)

plot(macdLine, title="MACD Line", color=color.blue, linewidth=2)
plot(signalLine, title="Signal Line", color=color.red, linewidth=2)

// RSI
rsi = ta.rsi(close, 14)
rsiOverbought = 80
rsiOversold = 20

hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, title="RSI", color=color.purple, linewidth=2)

// ATR (Average True Range)
atr = ta.atr(14)
plot(atr, title="ATR", color=color.gray, linewidth=1)

// Volume with Moving Average
vol = volume
volMa = ta.sma(vol, 20)

plot(vol, title="Volume", color=color.new(color.blue, 70), style=plot.style_columns) // Fixed transparency issue
plot(volMa, title="Volume MA (20)", color=color.orange, linewidth=2)

// Entry Signal (Bullish Breakout)
bullishEntry = ta.crossover(ema9, ema20) and close > vwap and rsi > 50 and macdLine > signalLine
plotshape(bullishEntry, title="Bullish Entry", location=location.belowbar, color=color.green, style=shape.labelup, size=size.small)

// Exit Signal (Bearish Reversal)
bearishExit = ta.crossunder(ema9, ema20) or close < vwap or macdLine < signalLine
plotshape(bearishExit, title="Bearish Exit", location=location.abovebar, color=color.red, style=shape.labeldown, size=size.small)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.