OPEN-SOURCE SCRIPT
Scalper SMA-RSI-MACD – Entry/Exit Signals v2

Scalper SMA–RSI–MACD Strategy (Intraday) – Indicator Version
This is an intraday scalping and short-term trading tool designed for manual trading. It provides entry and exit signals based on a combination of trend, momentum, and volatility-based risk management.
Core Components
Trend Filter (Optional)
Uses an EMA (default 200) and an SMA ribbon (5/8/13) to identify the primary trend direction.
Only allows long trades in uptrend and short trades in downtrend (can be turned off for more signals).
Entry Conditions
RSI Pullback: Detects oversold (for long) or overbought (for short) conditions based on a short RSI (default length = 4).
MACD Momentum Turn: Detects bullish or bearish MACD crossovers or momentum shifts.
Both conditions must occur within a specified lookback period (default = last 3 bars).
Stop Loss (SL) Placement
SL is placed at a fixed multiple of the ATR (Average True Range) from the entry price (default = 1.5 × ATR).
Adjusting the multiplier changes how far the SL is placed.
Take Profit (TP) Levels
Two targets: TP1 and TP2, each based on R-multiples of the SL distance.
Default: TP1 = 1 × risk (1:1 R/R), TP2 = 2 × risk (1:2 R/R).
Exit Modes (Selectable)
TP1 or SL
TP2 or SL
Opposite signal (exit when the opposite entry condition appears)
Session Filter (Optional)
Can restrict trading signals to specific market hours (default off for more signals).
Signals and Alerts
Displays LONG and SHORT arrows for entries.
Plots SL and TP levels on the chart.
Marks exits as TP, SL, or opposite signal.
Built-in alertcondition() allows creating TradingView alerts for all entry and exit events.
Typical Usage
Works best on 1-minute to 5-minute charts for scalping; can be adapted to higher timeframes for swing trading.
Ideal for manual execution — the trader sees the signal, checks market conditions, and decides whether to enter.
Can be tuned for more or fewer signals by adjusting RSI thresholds, MACD lookback, and trend filter settings.
This is an intraday scalping and short-term trading tool designed for manual trading. It provides entry and exit signals based on a combination of trend, momentum, and volatility-based risk management.
Core Components
Trend Filter (Optional)
Uses an EMA (default 200) and an SMA ribbon (5/8/13) to identify the primary trend direction.
Only allows long trades in uptrend and short trades in downtrend (can be turned off for more signals).
Entry Conditions
RSI Pullback: Detects oversold (for long) or overbought (for short) conditions based on a short RSI (default length = 4).
MACD Momentum Turn: Detects bullish or bearish MACD crossovers or momentum shifts.
Both conditions must occur within a specified lookback period (default = last 3 bars).
Stop Loss (SL) Placement
SL is placed at a fixed multiple of the ATR (Average True Range) from the entry price (default = 1.5 × ATR).
Adjusting the multiplier changes how far the SL is placed.
Take Profit (TP) Levels
Two targets: TP1 and TP2, each based on R-multiples of the SL distance.
Default: TP1 = 1 × risk (1:1 R/R), TP2 = 2 × risk (1:2 R/R).
Exit Modes (Selectable)
TP1 or SL
TP2 or SL
Opposite signal (exit when the opposite entry condition appears)
Session Filter (Optional)
Can restrict trading signals to specific market hours (default off for more signals).
Signals and Alerts
Displays LONG and SHORT arrows for entries.
Plots SL and TP levels on the chart.
Marks exits as TP, SL, or opposite signal.
Built-in alertcondition() allows creating TradingView alerts for all entry and exit events.
Typical Usage
Works best on 1-minute to 5-minute charts for scalping; can be adapted to higher timeframes for swing trading.
Ideal for manual execution — the trader sees the signal, checks market conditions, and decides whether to enter.
Can be tuned for more or fewer signals by adjusting RSI thresholds, MACD lookback, and trend filter settings.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。