META Scalp 5m (RSI+ADX/DMI+TSI+Vol+Squeeze+SMC-lite) [v1.1]Script Description
META Scalp 5m (RSI+ADX/DMI+TSI+Vol+Squeeze+SMC-lite) is a futures scalping strategy designed primarily for the 5-minute timeframe. Its goal is to filter higher-probability entries through a multi-indicator confluence engine that calculates a Score (from -100 to +100) and converts it into an estimated short-term probability of bullish or bearish continuation.
This script is not a magic predictor. It is a consensus-based decision engine: when multiple conditions align (direction + strength + volatility + context), it triggers entries with automatic risk management (SL/TP) based on ATR.
What it shows on the chart
Plots Fast EMA and Slow EMA for trend direction.
Entry markers:
Triangle “L” = Long signal
Triangle “S” = Short signal
SMC-lite events:
SW↑ = High sweep (possible stop hunt above)
SW↓ = Low sweep (possible stop hunt below)
Information panel showing:
Current Score
P(Long) / P(Short) in %
ADX
Volume confirmation (VolOk)
Squeeze status (ON/OFF)
Indicators and Modules Included
1) Trend Filter (EMA)
Fast EMA (default 21) and Slow EMA (default 55).
Bullish bias when:
Fast EMA > Slow EMA and rising.
Bearish bias when:
Fast EMA < Slow EMA and falling.
Purpose: avoid trading against strong trend momentum.
2) RSI
RSI (default 14) with configurable midpoint (default 50).
Bias:
RSI > 50 → bullish bias
RSI < 50 → bearish bias
RSI weight increases as it moves further away from 50.
3) ADX/DMI (Strength + Direction)
Uses +DI, -DI and ADX via ta.dmi().
Works as:
Strength filter: market considered tradable only if ADX ≥ threshold (default 18).
Direction: +DI > -DI → bullish; -DI > +DI → bearish.
When ADX is low, the script treats the market as choppy and avoids trades.
4) TSI (True Strength Index)
Momentum confirmation:
TSI above signal → bullish
TSI below signal → bearish
5) Volume Filter
Compares current volume vs Volume SMA (default 20).
VolOk when:
Volume > SMA(volume) × multiplier (default 1.10)
Filters low-participation signals.
6) Squeeze (BB vs KC approximation) + Momentum
Detects volatility compression:
Bollinger Bands inside Keltner Channels = Squeeze ON
Expansion signal when:
Squeeze OFF and momentum aligns:
Momentum rising → bullish bias
Momentum falling → bearish bias
Goal: capture post-compression expansions.
7) SMC-lite (Basic Smart Money Concepts)
This module implements simplified SMC logic:
A) Equal Highs / Equal Lows + Sweep
Detects equal highs/lows using pivots and ATR tolerance.
Sweep logic:
Wick above EQH and close back below → SW↑ (bearish/contrarian)
Wick below EQL and close back above → SW↓ (bullish/contrarian)
B) BOS-lite (Break of Structure)
Continuation signal when price closes beyond the last swing high/low.
Higher Timeframe Confirmation (15m)
Optional but recommended.
Calculates EMAs on a higher timeframe (default 15m).
If Score goes against HTF trend → score is penalized.
This avoids many bad 5m trades.
Score Engine & Probability
Core engine produces a Score between -100 and +100.
Positive score → Long bias
Negative score → Short bias
Converted into estimated probabilities:
P(Long) increases with Score
P(Short) = 100% − P(Long)
Important: probability is a mathematical transformation of the score, not a guaranteed statistical prediction.
Entry Rules
Long Entry
Triggered when:
Score ≥ Entry threshold (default 60)
Market not in chop (ADX filter)
Short Entry
Triggered when:
Score ≤ −Entry threshold
Market not in chop
Trade Management (SL/TP)
Risk management uses ATR-based dynamic levels:
Stop Loss = ATR × SL multiplier (default 1.2)
Take Profit = ATR × TP multiplier (default 1.5)
Optional:
ATR trailing stop
Early Exit (Score deterioration)
Positions can close early when confluence weakens:
Long closes if score falls below exit threshold.
Short closes if score rises above negative exit threshold.
Recommended Trading Approach
Best used as a quality filter, not blind signals.
Recommended Settings (5m scalping)
Timeframe: 5m
HTF confirmation: 15m ON
ADX minimum: 18–22
Entry score: 60–75
SL: 1.0–1.3 ATR
TP: 1.2–1.8 ATR
Trailing stop: useful in trending markets.
Workflow
Wait for Score to exceed threshold.
Avoid trades when ADX is low.
Prefer trades aligned with HTF trend.
Let SL/TP manage the trade.
Alerts
Built-in alerts:
META LONG
META SHORT
SMC Sweep High
SMC Sweep Low
Limitations
Pine Script cannot access private indicators (LuxAlgo, SmartBuzz, etc.).
TradingView VPVR/VRVP cannot be accessed directly via Pine.
Designed for backtesting and screening. Adjust settings per asset and exchange.
Best Practices
Test separately on BTC, ETH, and altcoins.
Include realistic fees and slippage.
Avoid high-impact news periods.
استراتيجية Pine Script®






















