OPEN-SOURCE SCRIPT

Smart Confluence

2 367
SMART CONFLUENCE (SC) [FREE]
Multi-Factor SMC Trading System

Smart Confluence combines multiple market structure signals into a single confluence score. When enough signals align, it generates BUY/SELL setups with precise Entry Zones, Stop Loss, and 3 Take Profit levels — all fully automated.

Free and Open Source.

THE CONCEPT: WHY CONFLUENCE MATTERS

No single indicator is reliable on its own. A CHOCH can fail. An Order Block can break. A sweep can be a fakeout. But when 4-6 different signals all agree at the same time — that's when the probability is in your favor.

Smart Confluence requires a core trigger (CHOCH, Sweep, or EQ-Grab) PLUS enough confirmations to reach the minimum confluence threshold before any signal fires. This eliminates most false signals.

CORE FEATURES

1. Market Structure Detection
Automatic Swing High/Low identification with Change of Character (CHOCH) — the moment a downtrend breaks above the last swing high (bullish) or an uptrend breaks below the last swing low (bearish). CHOCH is worth 2 confluence points.

2. Liquidity Sweeps
Detects stop-hunt patterns where price sweeps below recent lows (or above recent highs) and reverses. These sweeps indicate smart money collecting liquidity before the real move. Worth 2 confluence points.

3. EQH/EQL (Equal Highs/Lows)
Identifies liquidity pools where multiple swing points cluster at the same price level. When price sweeps through these clusters (EQ-Grab), it signals institutional order flow. Worth 3 confluence points (configurable).

4. Order Blocks & Fair Value Gaps
  • Order Blocks — The last opposing candle before a strong move — institutional supply/demand zones. +1 point when price is inside.
  • FVGs — Price imbalances (gaps between candles) that act as magnets. +1 point when price is inside.


5. Premium/Discount Zones
Calculates where price is relative to the current range. Buy in discount (<50%), sell in premium (>50%). OTE (Optimal Trade Entry) bonus for the 62-79% retracement zone. Up to +3 confluence points.

6. Confirmation Filters
  • Volume — High volume confirms institutional activity (+1-2 points)
  • RSI Divergence — Momentum exhaustion = strong reversal signal (+2 points)
  • EMA Trend Filter — Price vs EMA21/50/200 alignment (+1-2 points)
  • ATR Volatility — High volatility confirms market activity (+1 point)
  • HTF Trend — Higher timeframe trend agreement (+1 point)
  • Candlestick Patterns — Engulfing, Hammer, Shooting Star (+1 point)


AUTO-TIMEFRAME ADAPTATION

All parameters auto-adjust to your chart timeframe: Swing Length, Cooldown, OB Lookback, Min Confluence, HTF selection, SL Buffer, Min R:R, EQ Tolerance, EQ Age, Setup duration, S/R Cluster. Supports 1m to Monthly.

S/R ZONE DETECTION

Automatic Support/Resistance zones built from clustering multiple sources: Swing points, Order Blocks, FVGs, EQH/EQL levels, HTF levels. Each zone gets a strength score (1-5). Only shows the strongest zones.

ENTRY / SL / TP SYSTEM

  • Entry Zone — Based on active Order Block or FVG. Falls back to current candle range.
  • Stop Loss — 4 modes: Entry-Based, Swing, ATR, or SMC (below OB/FVG). R:R filter ensures minimum reward.
  • Take Profit — 4 modes: Structure (next swing), Fixed R:R, ATR-based, or Hybrid (structure if available, else R:R).
  • Partial TP — Configurable distribution (50/30/20, 33/33/34, 40/40/20, 60/30/10).


DASHBOARD

Compact dark-themed info panel showing: Mode (Auto/Manual + TF), Trend direction, HTF confirmation, Premium/Discount zone, S/R levels with strength, Bull/Bear confluence scores, Active setup details (direction, R:R, SL, Entry, TP1-3), SL/TP mode, Partial distribution.

ALERTS (8 CONDITIONS)

  • BUY Signal — Full confluence with valid R:R
  • SELL Signal — Full confluence with valid R:R
  • Bullish CHOCH — Trend reversal detected
  • Bearish CHOCH — Trend reversal detected
  • EQH Grab — Liquidity pool swept (bearish)
  • EQL Grab — Liquidity pool swept (bullish)
  • Bullish Sweep — Stop hunt detected
  • Bearish Sweep — Stop hunt detected


PRO VERSION

The PRO version (Smart Confluence Pro) adds:
  • Signal Profile Presets — Scalping, Intraday, Swing, Position, Aggressive, Conservative, SMC Pure
  • Asset Auto-Detection — Crypto, Forex, Stock, Futures with 8 scaling factors
  • A/B/C Signal Grading — Quality scoring based on Zone, HTF, Volume, Session, Divergence
  • Risk Management — Account size, risk %, position sizing, custom partial distributions
  • Session Filter — London, New York, Asia sessions with overlap detection
  • Funding Rate — Crypto perpetual funding rate as contrarian confluence
  • Trailing Stop Loss — Break-Even + Trail TP modes
  • Trade Management Alerts — TP1/TP2/TP3 hit, SL hit, Trailing updates, Setup expiry
  • 14+ Alert Types — Including A-Grade only alerts


NON-REPAINTING

All signals require confirmed bars (barstate.isconfirmed for EQH/EQL). Signal confirmation waits for the next candle. HTF data uses lookahead=barmerge.lookahead_off. No future data leakage. No repainting.

WORKS ON

Crypto, Forex, Stocks, Futures, Indices — any timeframe from 1 minute to Monthly.

DISCLAIMER

This indicator is for educational and informational purposes only. It does not constitute financial advice. Always do your own research and manage your risk. Past performance does not guarantee future results. Trading involves substantial risk of loss.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.