PROTECTED SOURCE SCRIPT

Prismatic Liquidity Engine [JOAT]

402
Prismatic Liquidity Engine v6 - SMC Structure, Liquidity & Confluence Suite

IMPORTANT NOTES (READ FIRST)
  • This is a strategy script with automated entry/exit logic for backtesting and forward-testing purposes. It does not place live trades without your broker integration.
  • This script is written in Pine Script® v6 and is intended to be used on standard candlestick charts (not Heikin Ashi, Renko, etc.).
  • Source code visibility: This script is published as Protected Source (closed-source) to prevent unauthorized copies and maintain versioning integrity. This description documents what the strategy does, how it works, and how to use it.
  • All backtesting results shown use the default settings documented below. Adjust parameters for your specific instrument and risk tolerance.


Protected Source / Closed-Source Clarification
  • Protected source means the internal implementation is not publicly viewable.
  • The operational behavior is documented here: what is detected, what each module does, what each input controls, and how to interpret the output.
  • If you see unauthorized copies elsewhere, report them via TradingView's plagiarism reporting system.


Overview
Prismatic Liquidity Engine v6 is a Smart Money Concepts (SMC) strategy that combines market structure analysis, liquidity zone detection, and price imbalance identification into a unified decision framework. The strategy identifies trading opportunities by analyzing:
  • Market structure shifts (Break of Structure / Change of Character)
  • Liquidity pools (equal highs/lows where stops accumulate)
  • Price imbalances (Fair Value Gaps created by aggressive institutional participation)
  • Order blocks (accumulation/distribution zones)


The strategy requires confluence across multiple factors before generating entries, filtering out noise and focusing on setups where structure, liquidity, and momentum align.

What Makes This Strategy Original (Originality & Usefulness)
This is not a simple mashup of standard indicators. The strategy implements a coordinated SMC workflow:
  • Structure defines the directional bias (BOS confirms trend, CHoCH signals potential reversal).
  • Liquidity zones identify where stop-hunts are likely to occur before major moves.
  • FVGs and Order Blocks provide objective entry zones with defined invalidation levels.
  • Session filtering restricts trading to high-liquidity periods (London/NY overlap).
  • ATR-based risk management adapts stop/target placement to current volatility.
  • Confluence scoring requires multiple conditions to align before entry.


The purpose is to systematize SMC concepts into a testable, repeatable framework rather than relying on discretionary interpretation.


1) Chart Visuals — What You See

A) Fair Value Gap (FVG) Zones
The strategy detects three-candle formations that create price imbalances:
  • Bullish FVGs: Gap between candle 1's high and candle 3's low after aggressive upward movement.
  • Bearish FVGs: Gap between candle 1's low and candle 3's high after aggressive downward movement.
  • Zones are drawn as boxes with size labels showing the gap in price terms.
  • Mitigation tracking marks zones as "used" when price trades back through them.


How to use:
  • FVGs represent areas where price moved too fast for balanced trading.
  • Price often returns to these zones before continuing in the original direction.
  • The strategy uses FVGs as potential entry zones when other confluence factors align.


B) Order Block (OB) Zones
  • Bullish OBs: Last down-candle before a strong upward move (institutional absorption).
  • Bearish OBs: Last up-candle before a strong downward move (institutional distribution).
  • Volume-weighted analysis distinguishes significant blocks from noise.
  • Breach detection invalidates spent order blocks.


C) Market Structure Labels
  • BOS (Break of Structure): Price breaks beyond previous swing high/low, confirming trend continuation.
  • CHoCH (Change of Character): Price breaks structure against the prevailing trend, signaling potential reversal.
  • Swing highs/lows are marked and connected for visual structure tracking.


D) Liquidity Zone Markers
  • Equal highs: Buy-side liquidity pools (stop losses from shorts).
  • Equal lows: Sell-side liquidity pools (stop losses from longs).
  • Sweep detection identifies when liquidity is taken.


E) Session Background Shading
  • Asian session: 0000-0900 UTC
  • London session: 0700-1600 UTC
  • New York session: 1300-2200 UTC
  • Background tint indicates active session for context.


F) Trend EMAs (Optional)
  • EMA 20 / 50 / 200 for trend direction context.
  • Used internally for trend alignment requirements.



2) Strategy Execution Logic (How Entries Work)

Long Entry Conditions (all must be true):
  • Market bias is bullish (confirmed by BOS or CHoCH analysis).
  • Price is within a valid bullish FVG or Order Block zone.
  • EMAs show bullish alignment or recovery.
  • Volume exceeds 20-period moving average (participation confirmation).
  • Trade window is active (session filter).
  • A BOS or CHoCH signal is present.


Short Entry Conditions (all must be true):
  • Market bias is bearish (confirmed by BOS or CHoCH analysis).
  • Price is within a valid bearish FVG or Order Block zone.
  • EMAs show bearish alignment or recovery.
  • Volume exceeds 20-period moving average.
  • Trade window is active.
  • A BOS or CHoCH signal is present.


Exit Logic:
  • Primary stop loss: ATR-based (default 1.5x ATR).
  • Fallback stop: Recent swing point if ATR stop is too wide.
  • Take profit: ATR-based (default 2.5x ATR).
  • Trailing stop available for locking in profits.



3) Strategy Properties & Backtesting Documentation

Default Strategy Properties (Properties Tab):
  • Initial Capital: $10,000 USD — realistic for average retail trader
  • Base Currency: USD
  • Order Size: 10% of equity per trade
  • Pyramiding: 1 order (no pyramiding for conservative risk)
  • Commission: 0.05% per order (realistic for CFD/forex brokers)
  • Slippage: 2 ticks per order (accounts for market impact)


Risk Per Trade:
With ATR Stop Multiplier at 1.5x and 10% position sizing, typical risk per trade is approximately 1-3% of equity depending on volatility. This is within the sustainable 5-10% maximum recommended by TradingView guidelines.

Published Backtest Results (GOLD 5m, Sep 28, 2025 – Jan 12, 2026):
  • Total Trades: 37
  • Profitable Trades: 56.76% (21 of 37)
  • Profit Factor: 2.067
  • Net Profit: +$40.90 USD (+0.04%)
  • Max Drawdown: $98.62 USD (0.10%)


Sample Size Justification:
This strategy intentionally generates fewer trades (37 in this sample) because it requires multi-factor confluence before entry:
  • Market structure confirmation (BOS or CHoCH)
  • EMA trend alignment
  • Valid SMC zone proximity when zone filter is enabled


The confluence requirement filters out low-probability setups, resulting in a positive profit factor (2.07) and controlled drawdown (0.10%) at the cost of trade frequency. This is a deliberate design choice — the strategy prioritizes quality over quantity.

To increase sample size for your own testing:
  • Test across multiple instruments (EURUSD, BTCUSD, indices)
  • Extend the historical date range
  • Reduce Swing Length parameter from 5 to 3


Strategy Input Defaults:
  • Swing Length: 5 bars
  • ATR Period: 14 bars
  • ATR Stop Multiplier: 1.5x ATR
  • ATR Take Profit Multiplier: 2.5x ATR (1.67:1 reward-to-risk)
  • Risk % of Equity: 1.0%
  • Trading Session: 0000-2359 (all sessions)
  • Require FVG/OB Zone Entry: OFF
  • Require Volume Confirmation: OFF
  • Require EMA Alignment: ON


Backtest Limitations & Realistic Expectations:
  • Backtesting assumes perfect fills at the close price — live execution will differ.
  • Commission and slippage significantly impact net results. Always test with your broker's actual fees.
  • Past performance does not guarantee future results.
  • Results vary across instruments, timeframes, and market regimes.
  • This strategy performs best in trending markets with clear structure — ranging/choppy conditions will produce more false signals.
  • Always forward-test on paper before risking real capital.



4) Real-Time Dashboard

The dashboard provides market context at a glance:
  • Market Bias: BULLISH / BEARISH / NEUTRAL based on structure.
  • Trend Strength: STRONG / WEAK based on EMA alignment.
  • ATR: Current volatility level with HIGH / MEDIUM / LOW classification.
  • Volume: Current volume ratio vs 20-period average (SPIKE / HIGH / NORMAL / LOW).
  • Session: Active trading session.
  • Key Levels: Dynamic resistance and support from recent structure.
  • Signal Count: Active SMC signals with strength indicator.
  • Trade Window: OPEN / CLOSED based on session filter.



5) Inputs & Settings Reference

Structure Detection
  • Swing Length: Lookback for swing high/low detection (default: 5). Lower = more signals, Higher = major structure only.


FVG Settings
  • Show FVGs: Toggle FVG box display.
  • FVG Extension: How long FVG boxes extend forward (default: 20 bars).


Order Block Settings
  • Show Order Blocks: Toggle OB display.
  • OB Extension: How long OB boxes extend forward (default: 20 bars).


Liquidity Settings
  • Liquidity Range %: ATR percentage for "equal high/low" classification (default: 0.5%).
  • Show Liquidity Zones: Toggle liquidity pool markers.


Strategy Controls
  • Enable Long Trades: Allow long entries (default: ON).
  • Enable Short Trades: Allow short entries (default: ON).
  • Risk % of Equity: Maximum risk per trade (default: 1.0%).
  • ATR Period: Length for ATR calculation (default: 14).
  • ATR Stop Multiplier: Stop distance in ATR units (default: 1.5).
  • ATR TP Multiplier: Take profit distance in ATR units (default: 2.5).
  • Trading Session Filter: Restrict entries to specific time windows (default: 0000-2359 = all day).
  • Require FVG/OB Zone Entry: When ON, price must be inside an FVG or OB zone. When OFF, trades trigger on structure signals alone (default: OFF).
  • Require Volume Confirmation: When ON, volume must exceed 20-period average (default: OFF).
  • Require EMA Alignment: When ON, price must be above/below EMAs for direction (default: ON).


Visual Settings
  • Show Dashboard: Toggle dashboard display.
  • Show Sessions: Toggle session background shading.
  • Show Fibonacci: Toggle Fibonacci level display.
  • Color Customization: Full control over all visual elements.



6) Recommended Workflow

Step 1 — Configure Risk Parameters
  • Set risk % appropriate for your account (1-2% recommended).
  • Adjust ATR multipliers based on your instrument's volatility.
  • Set commission/slippage to match your broker.


Step 2 — Select Appropriate Timeframe
  • M15-H1: Best balance of signal frequency and reliability.
  • H4-D1: Higher quality signals, fewer false positives.
  • M1-M5: Scalping possible but requires tighter risk management.


Step 3 — Backtest on Your Instrument
  • Run strategy tester with realistic commission/slippage.
  • Review trade list for entry quality.
  • Adjust parameters if needed for your specific market.


Step 4 — Forward Test Before Live Trading
  • Paper trade or use small size to validate real-time behavior.
  • Monitor for any discrepancies between backtest and live conditions.



7) Suitable Markets
  • Forex majors (EURUSD, GBPUSD, USDJPY) — 24/5 liquidity, clear structure.
  • Major indices (SPX, NASDAQ, DAX) — trending behavior, respects levels.
  • Gold (XAUUSD) — respects structure and liquidity concepts.
  • Crypto (BTCUSD, ETHUSD) — high volatility, adjust ATR multipliers.



8) Limitations & Best-Use Guidance
  • This strategy is a decision-support and backtesting tool, not a guaranteed profit system.
  • Performance varies across market conditions (trending vs ranging).
  • Low liquidity periods may produce false signals.
  • News events can override technical analysis.
  • Overnight gaps may affect stop placement.
  • Always validate with forward testing before live capital.



9) Alerts
  • Bullish / Bearish Regime Start
  • FVG Formation (Bull / Bear)
  • Order Block Detection
  • BOS / CHoCH Structure Shift
  • Liquidity Sweep
  • High-Volume Confirmation


Recommended: Use "Once Per Bar Close" for most reliable alerts.


Disclaimer

This strategy is for educational and backtesting purposes only. It does not constitute financial advice. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always test configurations on historical data and paper trading before applying them to live capital. You are solely responsible for your trading decisions and risk management.


-Made with passion by officialjackofalltrades

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.