PROTECTED SOURCE SCRIPT
Scalping Strategy with Targets

1. Indicator Overview
Property Value
Name Scalping Strategy with Targets
Version Pine Script v6
Type Technical Indicator with Trading Signals
Overlay Yes (displayed on price chart)
2. Core Functionality
This indicator generates buy and sell signals based on a combination of:
Exponential Moving Averages (EMA) crossover
RSI (Relative Strength Index)
Stochastic Oscillator
MACD (optional confirmation)
ATR (for dynamic TP/SL levels)
3. Technical Indicators Used
Indicator Parameters Purpose
Fast EMA Period: 9 Short-term trend detection
Slow EMA Period: 21 Long-term trend detection
RSI Period: 14, Overbought: 70, Oversold: 30 Momentum measurement
Stochastic K: 14, D: 3, Overbought: 80, Oversold: 20 Overbought/Oversold zones
MACD Fast: 12, Slow: 26, Signal: 9 Trend confirmation (optional)
ATR Period: 14 Dynamic TP/SL calculation
4. Signal Modes
Mode 1: Strong (EMA + Trend)
BUY = EMA Crossover + Fast EMA Rising + (RSI < 50 OR Uptrend)
SELL = EMA Crossunder + Fast EMA Falling + (RSI > 50 OR Downtrend)
Mode 2: Very Strong (EMA + RSI + Trend)
BUY = EMA Crossover + RSI < 40 + Fast EMA Rising + Price > Fast EMA
SELL = EMA Crossunder + RSI > 60 + Fast EMA Falling + Price < Fast EMA
Mode 3: Confirmations Mode
Requires a user-defined number of confirmations (1-3)
Each condition counts as one confirmation:
EMA Crossover/Crossunder
Fast MA Rising/Falling
RSI below/above 50
Price above/below Fast MA
Uptrend/Downtrend
MACD Bullish/Bearish (if enabled)
5. Filters (Optional)
Filter Condition Purpose
Volume Filter Volume > Volume SMA Ensure sufficient liquidity
ATR Filter ATR > Minimum ATR Avoid low volatility periods
6. TP/SL Calculation
All levels are calculated dynamically using ATR multiplier:
For BUY Signals:
├── TP1 = Entry Price + (ATR × 1.5)
├── TP2 = Entry Price + (ATR × 2.5)
└── SL = Entry Price - (ATR × 0.5)
For SELL Signals:
├── TP1 = Entry Price - (ATR × 1.5)
├── TP2 = Entry Price - (ATR × 2.5)
└── SL = Entry Price + (ATR × 0.5)
7. Signal Tracking Logic
┌─────────────────────────────────────────────────────────────┐
│ 1. Signal Triggered │
│ → Record entry price │
│ → Calculate TP1, TP2, SL │
│ → Set signalActive = true │
├─────────────────────────────────────────────────────────────┤
│ 2. Active Trade Monitoring │
│ → Check if price hits TP1 (mark as hit) │
│ → Check if price hits TP2 (mark as hit) │
│ → Check if price hits SL (mark as hit) │
├─────────────────────────────────────────────────────────────┤
│ 3. Trade Closure │
│ → When TP1 AND TP2 hit → Close trade │
│ → When SL hit → Close trade │
│ → Reset all values │
└─────────────────────────────────────────────────────────────┘
8. Dashboard Display
The indicator displays an interactive dashboard showing:
Row Content
1 Signal Type (BUY/SELL) + PnL %
2 Entry Price + Current Price + Trend Direction
3 Target Price (TP2) + Percentage + Status
4 Stop Loss + Percentage + Status
5 Separator
6 ATR Value + RSI Value
7 Stochastic + MACD Status
8 Volume + Confirmations Count
9. Visual Elements
On Chart:
Fast EMA (Orange line)
Slow EMA (Blue line)
BUY Signal (Green triangle below bar)
SELL Signal (Red triangle above bar)
TP1 Line (Lime/Red dashed line - visible on last bar only)
TP2 Line (Semi-transparent Lime/Red - visible on last bar only)
SL Line (Red line - visible on last bar only)
Dashboard Colors:
Element Color
BUY Signal Green (#00FF00)
SELL Signal Red (#FF0000)
Uptrend Green
Downtrend Red
Target Hit ✓✓ (Green)
SL Hit ✓ (Red)
Pending ○ (Gray)
10. Alerts
The indicator provides alert conditions for:
Buy Signal triggered
Sell Signal triggered
11. Key Features
✅ 3 Signal Modes - Choose between Strong, Very Strong, or Confirmations
✅ Optional Filters - Volume and ATR filters
✅ Dynamic TP/SL - Based on ATR volatility
✅ Interactive Dashboard - Real-time trade monitoring
✅ Visual Targets - TP/SL lines on chart
✅ Alert System - TradingView notifications
✅ Multi-timeframe Compatible - Works on any timeframe
Property Value
Name Scalping Strategy with Targets
Version Pine Script v6
Type Technical Indicator with Trading Signals
Overlay Yes (displayed on price chart)
2. Core Functionality
This indicator generates buy and sell signals based on a combination of:
Exponential Moving Averages (EMA) crossover
RSI (Relative Strength Index)
Stochastic Oscillator
MACD (optional confirmation)
ATR (for dynamic TP/SL levels)
3. Technical Indicators Used
Indicator Parameters Purpose
Fast EMA Period: 9 Short-term trend detection
Slow EMA Period: 21 Long-term trend detection
RSI Period: 14, Overbought: 70, Oversold: 30 Momentum measurement
Stochastic K: 14, D: 3, Overbought: 80, Oversold: 20 Overbought/Oversold zones
MACD Fast: 12, Slow: 26, Signal: 9 Trend confirmation (optional)
ATR Period: 14 Dynamic TP/SL calculation
4. Signal Modes
Mode 1: Strong (EMA + Trend)
BUY = EMA Crossover + Fast EMA Rising + (RSI < 50 OR Uptrend)
SELL = EMA Crossunder + Fast EMA Falling + (RSI > 50 OR Downtrend)
Mode 2: Very Strong (EMA + RSI + Trend)
BUY = EMA Crossover + RSI < 40 + Fast EMA Rising + Price > Fast EMA
SELL = EMA Crossunder + RSI > 60 + Fast EMA Falling + Price < Fast EMA
Mode 3: Confirmations Mode
Requires a user-defined number of confirmations (1-3)
Each condition counts as one confirmation:
EMA Crossover/Crossunder
Fast MA Rising/Falling
RSI below/above 50
Price above/below Fast MA
Uptrend/Downtrend
MACD Bullish/Bearish (if enabled)
5. Filters (Optional)
Filter Condition Purpose
Volume Filter Volume > Volume SMA Ensure sufficient liquidity
ATR Filter ATR > Minimum ATR Avoid low volatility periods
6. TP/SL Calculation
All levels are calculated dynamically using ATR multiplier:
For BUY Signals:
├── TP1 = Entry Price + (ATR × 1.5)
├── TP2 = Entry Price + (ATR × 2.5)
└── SL = Entry Price - (ATR × 0.5)
For SELL Signals:
├── TP1 = Entry Price - (ATR × 1.5)
├── TP2 = Entry Price - (ATR × 2.5)
└── SL = Entry Price + (ATR × 0.5)
7. Signal Tracking Logic
┌─────────────────────────────────────────────────────────────┐
│ 1. Signal Triggered │
│ → Record entry price │
│ → Calculate TP1, TP2, SL │
│ → Set signalActive = true │
├─────────────────────────────────────────────────────────────┤
│ 2. Active Trade Monitoring │
│ → Check if price hits TP1 (mark as hit) │
│ → Check if price hits TP2 (mark as hit) │
│ → Check if price hits SL (mark as hit) │
├─────────────────────────────────────────────────────────────┤
│ 3. Trade Closure │
│ → When TP1 AND TP2 hit → Close trade │
│ → When SL hit → Close trade │
│ → Reset all values │
└─────────────────────────────────────────────────────────────┘
8. Dashboard Display
The indicator displays an interactive dashboard showing:
Row Content
1 Signal Type (BUY/SELL) + PnL %
2 Entry Price + Current Price + Trend Direction
3 Target Price (TP2) + Percentage + Status
4 Stop Loss + Percentage + Status
5 Separator
6 ATR Value + RSI Value
7 Stochastic + MACD Status
8 Volume + Confirmations Count
9. Visual Elements
On Chart:
Fast EMA (Orange line)
Slow EMA (Blue line)
BUY Signal (Green triangle below bar)
SELL Signal (Red triangle above bar)
TP1 Line (Lime/Red dashed line - visible on last bar only)
TP2 Line (Semi-transparent Lime/Red - visible on last bar only)
SL Line (Red line - visible on last bar only)
Dashboard Colors:
Element Color
BUY Signal Green (#00FF00)
SELL Signal Red (#FF0000)
Uptrend Green
Downtrend Red
Target Hit ✓✓ (Green)
SL Hit ✓ (Red)
Pending ○ (Gray)
10. Alerts
The indicator provides alert conditions for:
Buy Signal triggered
Sell Signal triggered
11. Key Features
✅ 3 Signal Modes - Choose between Strong, Very Strong, or Confirmations
✅ Optional Filters - Volume and ATR filters
✅ Dynamic TP/SL - Based on ATR volatility
✅ Interactive Dashboard - Real-time trade monitoring
✅ Visual Targets - TP/SL lines on chart
✅ Alert System - TradingView notifications
✅ Multi-timeframe Compatible - Works on any timeframe
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.