[ A L P H A X ] Prism Price Action Institutional FlowAlphaX Prism — Price Action × Key Levels × Institutional Flow | Confluence Engine, Smart Entry/Exit Signals & Multi-Factor Confidence Scoring
AlphaX Prism is a professional-grade price action and confluence trading system that fuses three powerful analytical dimensions into a single, cohesive overlay indicator: automatic Key Level detection, real-time Price Action pattern recognition, and Institutional Footprint tracking. Every signal is governed by a 10-factor confluence scoring engine and a weighted confidence percentage system — so only high-quality, structurally valid setups reach your chart. Designed for traders who want clean, context-aware signals rooted in market structure rather than lagging oscillators.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Three Pillars of AlphaX Prism
AlphaX Prism operates across three simultaneous analytical layers, each feeding into the central confluence engine:
I. Key Level Engine — Automatic Support & Resistance Detection
The Key Level engine automatically identifies, tracks, and manages the most significant support and resistance zones on your chart using swing pivot detection. Rather than drawing static lines, AlphaX Prism builds intelligent zones that evolve as price interacts with them.
How the Key Level engine works:
Swing Pivot Detection — identifies significant highs and lows using a configurable swing length parameter
Zone Merging — nearby levels within a configurable ATR-based threshold are merged into a single consolidated zone, preventing level clutter
Touch Counting — each zone tracks how many times price has interacted with it. Zones below the minimum touch threshold appear in neutral gray; confirmed zones flip to color-coded support (yellow-green) or resistance (red)
Zone Age Management — zones older than a configurable bar count are automatically retired and removed, keeping your chart focused on relevant levels only
Dynamic Extension — all zones and lines extend to the right edge of the chart in real time
Key Level signals feed directly into the confluence engine and generate specific condition flags:
Price at Support — price is currently trading within a confirmed support zone
Price at Resistance — price is currently trading within a confirmed resistance zone
Bounce from Support — price touched support and closed bullish with a meaningful body — the highest-value condition for long setups
Rejection from Resistance — price touched resistance and closed bearish with a meaningful body — the highest-value condition for short setups
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
II. Price Action Pattern Engine — What the Candles Are Saying
AlphaX Prism recognizes five core price action patterns in real time, each validated with additional filters to reduce false triggers:
Bullish / Bearish Engulfing
A bullish candle that fully engulfs the prior bearish candle (or vice versa), with a meaningful body ratio and a candle range above a minimum ATR threshold. Engulfing patterns receive the highest PA score in the confluence engine and trigger a dedicated marker on the chart when occurring at a key level or in the direction of the established trend.
Bullish / Bearish Pin Bar
A candle with a wick at least 2.5× the body length, where the wick is significantly larger than the opposing wick, and the close is in the upper or lower half of the candle's range respectively. The candle must meet a minimum ATR size threshold to qualify.
Inside Bar Breakout
When a candle is fully contained within the prior candle's range (inside bar), the next candle breaking out above or below that range — with a directional close and a meaningful body — triggers an inside bar breakout marker. A controllable toggle allows you to enable or disable this pattern type independently.
Momentum Shift (3-Bar Reversal)
Two consecutive candles in one direction followed by a third candle that breaks the prior candle's extreme and closes with a body ratio above 0.5. This pattern captures short-term momentum reversals within the context of a broader structure.
Strong Directional Candle
A candle with a body ratio above 0.65 and a body size exceeding the average body — used as a supplementary structural signal within the confluence engine.
Pattern markers are context-filtered — they only appear when occurring at a key level, aligned with the trend structure, or accompanied by a bounce/rejection confirmation. This eliminates random pattern signals in the middle of nowhere.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
III. Institutional Footprint — Tracking Large Money Flow
Retail price action alone does not tell the full story. AlphaX Prism tracks two types of institutional activity that are invisible to most traders:
Institutional Candles — Directional Large-Body Moves
A bullish or bearish candle whose body exceeds the 20-bar average body by a configurable multiplier (default: 1.8×)
Volume exceeds the moving average by a configurable multiplier (default: 1.3×)
Body ratio above 0.55, with a close in the upper or lower third of the range — confirming directional conviction
These appear as bright colored dots at the bottom of the chart (yellow-green for bull, red for bear)
Absorption Candles — Hidden Accumulation and Distribution
A large wick (more than 2× the body) with high volume — indicating large orders absorbing supply or demand without a visible directional body
The wick must be at least 1.5× larger than the opposing wick, and the candle range must exceed the ATR minimum
These appear as dimmer dots at the bottom of the chart — subtler activity, but often a precursor to a directional move
Volume Spikes — when high volume occurs without an institutional candle pattern, a neutral gray dot appears — flagging elevated participation without clear directional conviction.
Institutional activity feeds into the confluence engine and acts as a significant signal amplifier when aligned with price action and key levels.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Two Signal Layers
AlphaX Prism produces two distinct signal types, each serving a specific role in the trade lifecycle:
1 ─ Entry Signals (▲ / ▼)
Entry signals are generated when the confluence engine determines that enough independent factors are aligned simultaneously. A bullish entry (▲) or bearish entry (▼) label appears offset from the bar with a dotted connector line for visual clarity.
Entry signals require ALL of the following to fire:
Confluence score meets or exceeds the minimum threshold (default: 4 out of 10 factors)
A qualifying Price Action pattern is present
A structural reason exists (key level, institutional candle, or trend context)
The candle is clean — not overextended, not at an RSI extreme, and with a meaningful body
ADX confirms a trending environment (not a ranging, directionless market)
Signal cooldown has elapsed since the last signal
When both bull and bear conditions trigger simultaneously, the higher-confluence side wins. If scores are equal, no signal fires — tie goes to caution.
2 ─ Exit Signals (✕)
Exit signals fire after an entry signal has been established and a reversal condition develops. They are filtered by the same cooldown as entries to prevent rapid oscillation.
Long Exit — price reaches a resistance zone and a bearish engulfing forms, or the trend shifts down with price below the medium EMA and MACD bearish, or an institutional selling candle closes below the fast EMA, or RSI is overbought with a bearish pattern
Short Exit — the inverse of the above conditions for a long exit
Exit signals indicate that the momentum behind the current trade is deteriorating. Use them to take partial or full profit, or to tighten your stop loss ahead of a potential reversal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 10-Factor Confluence Scoring System
Every bar is evaluated against ten independent confluence factors — each one a separate reason to consider a trade. Only setups where enough factors align simultaneously are displayed.
The 10 Confluence Factors:
1. Key Level — price is bouncing from support or rejecting resistance (highest weight)
2. Price Action Pattern — any qualifying PA pattern is present
3. Strong Pattern Bonus — engulfing or momentum shift (higher-conviction PA types)
4. Institutional Activity — institutional candle or absorption present in signal direction
5. Trend Structure — swing-based trend direction (HH/HL or LL/LH) aligns with signal
6. MACD Momentum — MACD line above/below signal line and histogram expanding in signal direction
7. RSI Alignment — RSI slope rising/falling within the mid-range zone (not extreme)
8. RSI Divergence — price makes a new extreme but RSI does not confirm, signaling exhaustion
9. Volume — current volume exceeds the moving average in the signal direction
10. EMA Alignment — fast, medium, and slow EMAs are stacked in the signal direction, or price is positioned correctly relative to the 200 EMA
The score (0–10) is displayed in the dashboard alongside a weighted confidence percentage (0–100%) and a letter grade (D through A+).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Weighted Confidence Engine
In addition to the 10-factor binary confluence score, AlphaX Prism computes a weighted confidence percentage that assigns different point values to each factor based on its structural importance.
Bull / Bear Confidence Scoring Breakdown:
Bounce from Support / Rejection from Resistance — up to 18 points (the single most important condition in price action trading)
Price at Key Level without confirmed bounce/rejection — 12 points
PA Pattern Type — Engulfing: 14 pts | Momentum Shift: 12 pts | Pin Bar: 10 pts | Inside Bar Break: 8 pts
Institutional Candle — 12 points | Absorption: 8 points
Trend Structure Aligned — 10 points | Structural confirmation only: 6 points
MACD Momentum — both line and histogram aligned: 6 pts | line only: 3 pts
RSI Slope in Range — 5 points
RSI Divergence — 8 points
Volume Spike — 6 points | Above average: 3 points
EMA Trend Fully Aligned — 8 points | Price above/below 200 EMA only: 3 points
ADX Strong — 6 points
Penalty Deductions:
RSI at opposite extreme — -12 points (signal in wrong RSI zone)
Counter-trend direction — -15 points (trading against the established structure)
ADX weak / no trend — -6 points
Price overextended from EMA — -8 points
No PA pattern at all — -10 points (structure without a trigger is not enough)
Below average volume — -4 points
Letter Grade Scale:
A+ — 70% and above: exceptional confluence, all major factors aligned
A — 55–69%: high-quality setup with strong structural backing
B — 40–54%: good setup with most factors aligned
C — 25–39%: marginal setup, use caution and tighter risk management
D — below 25%: weak confluence, typically filtered out before display
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 EMA System
Three Exponential Moving Averages provide structural context for trend bias and signal filtering:
Fast EMA (21) — yellow-green cross markers — the immediate momentum reference. When price holds above the Fast EMA, intrabar momentum favors longs.
Medium EMA (50) — gray line — the intermediate trend filter. Slope direction confirms trend momentum across recent bars.
Slow EMA (200) — dark gray line, thicker — the structural backbone. Price position relative to the 200 EMA contributes to the confidence score and defines the macro bias.
EMA Fan Analysis:
All three EMAs fanning outward in order (Fast > Medium > Slow for bullish) — healthy trend, re-entry signals carry higher confidence
EMAs converging — trend is weakening, expect chop or reversal
EMAs tangled and flat — range-bound market, step aside and wait for structure to return
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Trend Structure Detection
AlphaX Prism tracks swing-based market structure using configurable pivot detection:
Uptrend (▲ UPTREND) — confirmed when the most recent significant high is higher than the prior high AND the most recent significant low is higher than the prior low (Higher Highs + Higher Lows)
Downtrend (▼ DOWNTREND) — confirmed when the most recent significant high is lower than the prior high AND the most recent significant low is lower than the prior low (Lower Highs + Lower Lows)
A configurable cooldown prevents label spam during choppy structure transitions
The trend structure direction is used as a directional filter and adds directly to the confluence score. Signals trading against the identified structure receive a significant confidence penalty.
ADX is calculated alongside the swing structure to confirm whether the trend has sufficient momentum. The ADX threshold (default: 22) prevents signals from firing during flat, low-conviction periods — regardless of how many other factors align.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 RSI Divergence Detection
AlphaX Prism includes a built-in RSI divergence scanner that runs continuously alongside all other analysis:
Bullish Divergence — price makes a lower low but the RSI pivot low is higher than the prior RSI low — indicating weakening bearish momentum
Bearish Divergence — price makes a higher high but the RSI pivot high is lower than the prior RSI high — indicating weakening bullish momentum
Divergences are validated against pivot lookback windows to ensure they represent meaningful structural shifts rather than random oscillator noise. When detected, they are marked with small diamond shapes and contribute up to 8 points to the confidence score.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Prism — Step by Step
Step 1 — Read the Dashboard
Check PRICE POSITION: Is price bouncing from support, rejecting resistance, or between levels?
Check TREND: Is structure bullish, bearish, or ranging?
Check ADX: Is there a trending environment, or is it weak and directionless?
Check PA PATTERN: Is there a qualifying candle pattern on the current bar?
If VERDICT reads "WEAK TREND — WAIT" or "NO PA PATTERN — WAIT" → do not enter. Preserve capital.
Step 2 — Wait for an Entry Signal
A ▲ or ▼ signal label appears when all mandatory conditions are met
Check the dashboard for the BULL SCORE or BEAR SCORE and the letter grade — higher grades represent cleaner, higher-probability setups
An A or A+ grade at a confirmed key level with institutional activity is the highest-conviction setup the system can produce
Step 3 — Confirm the Setup Manually
Review FACTORS in the dashboard — which of the 10 conditions are confirmed?
Look for a Bounce from Support or Rejection from Resistance as the anchor
Verify that volume is above average and the institutional footprint dots support the direction
Place your stop loss beyond the recent swing high/low or beyond the key level zone
Step 4 — Manage the Trade
Monitor the dashboard for changes in trend, RSI state, and institutional flow
If the VERDICT shifts from your trade direction, begin tightening your stop loss
Use subsequent entry signals in the same direction as opportunities to add to a winning position
Step 5 — Exit on the ✕ Mark
When an exit marker appears, the system has detected a counter-trend structural condition
Take partial or full profit
Do not immediately reverse — wait for a new entry signal in the opposite direction before committing to a new trade
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🏗 Automatic Key Level detection with zone merging, touch counting, and age management
🕯 Five Price Action pattern types — Engulfing, Pin Bar, Inside Bar Breakout, Momentum Shift, and Strong Directional Candle
🏦 Institutional footprint tracking — directional institutional candles and absorption patterns with volume validation
🧠 10-factor confluence binary score + weighted percentage confidence engine with A+ to D letter grading
📐 Three EMAs (21 / 50 / 200) for structural context, fan analysis, and trend bias
📉 Swing-based trend structure detection with HH/HL and LL/LH logic and a configurable trend label cooldown
⚡ ADX integration — prevents signals from firing in low-conviction, ranging environments
💎 RSI divergence scanner — continuously monitors for bullish and bearish momentum divergence
📊 MACD momentum engine — directional and histogram-based momentum alignment
✕ Context-aware exit signals — fire only after an active entry and only under specific structural reversal conditions
🖥 Fully featured dashboard — price position, PA pattern, institutional activity, trend, EMA, RSI, volume, confluence scores, verdict, and last signal details all in one panel
🎨 Cohesive dual-tone color theme — yellow-green for bullish, red for bearish, gray for neutral and weak conditions
🔔 8 alert conditions — long/short signals, engulfing at key levels, institutional candles, and RSI divergences
⚙ Fully configurable — all swing lengths, thresholds, ATR multipliers, confluence minimums, EMA periods, colors, and display toggles are adjustable from the settings panel
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Key Levels
Key Level Swing Length — pivot detection lookback for support/resistance identification (default: 8)
Merge Zones (x ATR) — how close two levels must be to merge into a single zone (default: 1.2× ATR)
Max Active Zones — maximum number of key level zones displayed simultaneously (default: 6)
Zone Max Age (bars) — how many bars before a zone is retired and removed (default: 250)
Show Key Level Zones — toggle zone box fills
Show Key Level Lines — toggle dotted center lines
Min Touches to Confirm — how many interactions before a zone is considered confirmed and color-coded (default: 2)
Price Action
Show PA Pattern Markers — toggle all price action pattern markers
Min Body Ratio (Engulf) — minimum body-to-range ratio required for engulfing patterns (default: 0.4)
Pin Bar Wick Ratio — minimum wick-to-body ratio required for pin bars (default: 2.5)
Show Inside Bar Breakouts — enable/disable inside bar breakout signals
Show Momentum Shift — enable/disable 3-bar momentum shift detection
Institutional Flow
Inst. Body Size (x Avg) — body size multiplier required for institutional candle detection (default: 1.8)
Inst. Volume (x Avg) — volume multiplier required for institutional candle detection (default: 1.3)
Show Institutional Candles — toggle all institutional footprint dots
Trend Context
Trend Swing Length — pivot lookback for trend structure HH/HL/LL/LH detection (default: 12)
Show Trend Shift Labels — toggle UPTREND/DOWNTREND structural labels
Trend Label Cooldown — minimum bars between consecutive trend labels (default: 18)
ADX Length — period for ADX trend strength calculation (default: 14)
ADX Trend Threshold — minimum ADX value required to permit signal generation (default: 22)
Momentum
RSI Length — period for RSI calculation (default: 14)
Show RSI Divergence — toggle the RSI divergence scanner and markers
Volume
Volume MA Length — period for volume moving average used in all volume comparisons (default: 20)
EMA Settings
Show Fast / Medium / Slow EMA — individual visibility toggles for each EMA
Fast EMA Length — default: 21
Medium EMA Length — default: 50
Slow EMA Length — default: 200
Confluence Engine
Min Confluence Score — minimum number of the 10 factors required to permit signal generation (default: 4)
Show Entry Signals — toggle all ▲ / ▼ entry signal labels
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 12)
Show Exit Signals — toggle all ✕ exit signal markers
Display
Show Dashboard — toggle the full dashboard panel
Dashboard Position — Top Right / Top Left / Bottom Right / Bottom Left
Dashboard Text Size — Tiny / Small / Normal
Dashboard Background — configurable background color
Theme Colors
Bull Primary / Bright / Dim — the yellow-green family for all bullish elements
Bear Primary / Bright / Dim — the red family for all bearish elements
Support / Resistance / Neutral Zone Colors — configurable zone color scheme
Pattern Color — marker color for price action pattern labels
Institutional Color — dot color for institutional footprint markers
Individual EMA Colors — Fast (yellow-green), Medium (gray), Slow (dark gray)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
Prism Long Signal — fires when a confirmed ▲ entry signal appears
Prism Short Signal — fires when a confirmed ▼ entry signal appears
Engulf at Support — fires when a bullish engulfing pattern forms at a confirmed support zone
Engulf at Resistance — fires when a bearish engulfing pattern forms at a confirmed resistance zone
Institutional Buying — fires when an institutional bullish candle is detected
Institutional Selling — fires when an institutional bearish candle is detected
RSI Bull Divergence — fires when a confirmed bullish RSI divergence is detected
RSI Bear Divergence — fires when a confirmed bearish RSI divergence is detected
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook and bot integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is tuned for intraday trading on XAUUSD, forex majors, and indices (NAS100, US30, SPX500) on timeframes from M1 to H1.
For best results across different instruments:
Higher timeframes (H1, H4) — increase Trend Swing Length to 18–25, increase Min Confluence to 5–6, increase Signal Cooldown to 20–30
Volatile instruments (Gold, NAS100) — use defaults or increase ADX threshold to 25 for tighter trend filtering
Forex majors (EURUSD, GBPUSD) — reduce Inst. Body Size multiplier to 1.5, keep defaults otherwise
Calmer instruments — reduce ADX threshold to 18–20, reduce Min Confluence to 3
Fewer, cleaner signals — increase Min Confluence Score, increase ADX Threshold, increase Signal Cooldown
More frequent signals — decrease Min Confluence Score to 3, decrease Signal Cooldown to 8, reduce ADX Threshold to 18
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Price action traders — built on the foundations of PA trading: key levels, candlestick patterns, and structural context, with no dependence on arbitrary indicator signals
🏦 Traders who want to track institutional activity — the footprint engine highlights where large money is likely entering and exiting the market
📊 Confluence-based traders — the 10-factor scoring system provides a systematic, quantified framework for evaluating setups rather than relying on intuition alone
🧠 Systematic and discretionary traders alike — the dashboard makes every condition transparent and readable at a glance, while the alert system supports fully automated notification workflows
📈 Traders who struggle with overtrading — the mandatory ADX filter, PA pattern requirement, and minimum confluence threshold physically prevent weak or unqualified setups from generating signals
🎨 Traders who value clean, uncluttered charts — all elements follow a cohesive color theme, and the system is designed to show you only what matters, when it matters
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are calculated on bar close — AlphaX Prism is non-repainting. A signal that appears will not disappear on the next bar.
The key level zone boxes extend to the right edge of the chart in real time. As new bars form, zones that have aged beyond the maximum bar count are automatically removed.
RSI divergence detection uses a 5-bar pivot lookback on each side — divergences are confirmed only when the current bar is within 3 bars of the pivot, and the two pivots are between 5 and 50 bars apart, ensuring only meaningful divergences are flagged.
Designed for M1 through H1 timeframes. On daily or weekly charts, the ADX and confluence filters still function, but key level zone density may need adjustment via the swing length and max zones settings.
Maximum 500 labels and 500 boxes are used — on very low timeframes with extended chart history, oldest elements may be automatically removed by TradingView's rendering limits.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who trade what they see — not what they hope.
Indicador Pine Script®






















