OPEN-SOURCE SCRIPT

[ A L P H A X ] VECTOR - Regime-Adaptive Flow Engine

833
AlphaX VECTOR — Regime-Adaptive Flow Engine: Kaufman ER Regime Classification, KAMA Vector Line, Multi-Component Flow Score & Scalping-Optimized Entry Playbooks

AlphaX VECTOR is a professional-grade scalping system built around a fundamentally different architectural premise from every other indicator in the AlphaX suite: the market regime is identified first, and the entry playbook is selected automatically to match that regime. Most scalping systems apply the same entry logic regardless of whether the market is trending, ranging, or chopping — and then wonder why the same setup works brilliantly in one context and fails consistently in another. VECTOR solves this at the architectural level by running a three-metric regime classification engine (Efficiency Ratio, Choppiness Index, and ADX) that determines the current market character on every bar and locks in one of four states: Trend Bull, Trend Bear, Balance/Range, or Chop. Each state activates a different set of entry playbooks — micro-pullbacks to the Vector Line in trends, micro-impulse breaks in balance or trend, mean-reversion fades at band extremes in balance — and all entries are filtered through a 6-component Flow Vector score that measures the directional conviction of the current market from five independent dimensions. The result is a system where every signal is not just directionally filtered, but regime-appropriate — built for M1 through M15 scalping on gold, forex, indices, and crypto.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🧭 The Core Philosophy — Regime First, Setup Second

The single biggest failure mode in scalping is applying trend-following entries in choppy markets and mean-reversion entries in trending markets. The market character changes continuously — a trending gold session can collapse into a tight range within minutes, and a balance period can explode into a directional impulse with no warning. Any fixed system that ignores this regime cycle will have extended periods of consistent losses whenever the market shifts character.

VECTOR's architecture inverts the standard approach. Instead of picking a setup type and then trying to filter bad signals, VECTOR determines the market's current character first — with three independent quantitative measurements — and then selects the correct playbook for that character. In Trend Bull, only pullback and impulse break setups fire. In Balance, only impulse breaks and band fades fire. In Chop, nothing fires. The dashboard explicitly tells you the active playbook at all times: SCALP PULLBACK ▲, SCALP PULLBACK ▼, SCALP FADE / BREAK, or NO TRADES.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 The Regime Engine — Three Independent Classifiers

The regime is determined on every bar by three completely independent measurements. The combination of all three produces a robust, multi-dimensional picture of market character that no single indicator alone could provide.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Kaufman Efficiency Ratio (ER)

The Efficiency Ratio measures how directionally efficient price movement has been over the lookback period (default: 10 bars). It divides the net directional change in price by the total path traveled — the sum of all individual bar-to-bar movements. A ratio close to 1.0 means every bar moved in the same direction — maximum efficiency, maximum trend. A ratio close to 0.0 means the total path traveled far exceeds the net movement — price oscillated back and forth with no net progress — maximum chop, minimum efficiency.

ER thresholds:
  • ER ≥ 0.35 (trend minimum) — price is moving with high directional efficiency. The market is trending and momentum setups are appropriate
  • ER ≤ 0.22 (chop maximum) — price is oscillating with low efficiency. Combined with low ADX, this triggers the CHOP regime and blocks all signals
  • Between thresholds — transitional state. Not clear trend, not clear chop


The ER is displayed live on the dashboard with color coding — yellow-green when in trend territory, orange when in chop territory, neutral otherwise. This single number tells you the fundamental quality of price direction at any given moment.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Choppiness Index

The Choppiness Index (CI) provides an independent measure of market randomness using a logarithmic ratio formula. It calculates the sum of all individual ATR readings over the lookback period (default: 14 bars) divided by the total high-low range of that period. High CI values indicate the range of the period was consumed by oscillating ATRs — choppy movement. Low CI values indicate the period's range was established by directional movement.

CI interpretation:
  • CI above 61.8 — the market is in a Golden Ratio chop zone. Institutional consensus is absent. All signals are suppressed when this threshold is exceeded (configurable, default: 61.0)
  • CI below 38.2 — maximum trending efficiency. In practice, CI values this low indicate an impulsive directional move in progress
  • CI between 38.2 and 61.8 — transitional territory, neither pure trend nor pure chop


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ADX (Average Directional Index)

The ADX provides the most widely recognized trend strength measure, confirming whether a directional bias measured by ER and CI is backed by genuine momentum. ADX above the configured minimum (default: 20) is required for Trend Bull or Trend Bear regime classification. Below the minimum, even if ER is high and CI is low, the system classifies as Balance rather than Trend — the directional efficiency exists but the momentum confirmation is absent.

Combined regime logic:
  • CHOP (0) — CI above threshold OR (ER below chop max AND ADX below trend min). The market is in an untradeable oscillating state. Dashboard shows ⛔ CHOP — STAND ASIDE. All signals blocked
  • TREND BULL (1) — not chop, ADX above trend min, ER above trend min, Flow Vector positive, price above Vector Line. Playbook: SCALP PULLBACK ▲
  • TREND BEAR (2) — same conditions with Flow Vector negative and price below Vector Line. Playbook: SCALP PULLBACK ▼
  • BALANCE (3) — not chop, but ADX or ER conditions for trend not met. Market is directional enough for scalping but not in a clear trend. Playbook: SCALP FADE / BREAK


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 The KAMA Vector Line — Adaptive Trend Reference

The Vector Line is a Kaufman Adaptive Moving Average (KAMA) — the same ER-weighted adaptive EMA that forms the basis of the regime classification. It is the central price reference for all pullback entries and a key component of the Flow Vector score.

Why KAMA over a standard EMA: A standard EMA responds with the same speed regardless of market conditions. In a trending market, the EMA lags price and creates false pullback signals. In a choppy market, it whipsaws. KAMA self-adjusts — it moves quickly in trending conditions (tracking price closely) and moves slowly in choppy conditions (staying stable). This means the Vector Line acts as an accurate, self-calibrating trend reference that naturally tightens around price during strong trends and widens away from price during chop.

Vector Line color coding: The line is plotted in gradient color based on the current Flow Vector score — bright yellow-green when the Flow Vector is strongly positive (above the Strong Vector threshold), bright red when strongly negative, fading to semi-transparent in neutral territory. At a glance, the Vector Line's color tells you the directional conviction of the current market.

Vector Line price: The exact current Vector Line price is displayed on the dashboard as VECTOR LINE in real time — the precise price level where pullback entries are being monitored.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The Flow Vector — 6-Component Directional Score

The Flow Vector is a composite directional score ranging from -100 (maximum bearish conviction) to +100 (maximum bullish conviction). It is computed on every bar from six independent measurements, each capturing a different dimension of directional bias.

Component 1 — EMA Stack (up to ±22 points):
A triple EMA (8/21/50) full stack alignment — EMA 8 above EMA 21 above EMA 50, with price above EMA 8 — scores +22 points for bull, -22 for bear stack. Partial alignment (price simply above or below EMA 21) scores ±8. This is the momentum structure layer.

Component 2 — Vector Line Slope (up to ±18 points):
Whether the KAMA Vector Line is currently rising or falling. A rising Vector Line in a bull trend confirms the adaptive average is itself accelerating — ±18 points. This ensures the entry direction is aligned with the KAMA's own momentum, not fighting it.

Component 3 — OBV Slope (up to ±15 points):
The slope of On-Balance Volume over the configured lookback period (default: 10 bars). A rising OBV slope means net buying pressure is accumulating (each up-close bar adds volume, each down-close subtracts). A falling slope confirms net selling. ±15 points. This is the volume accumulation/distribution layer — independent of price movement.

Component 4 — Volume Delta (up to ±12 points):
The estimated directional volume pressure — bull volume EMA minus bear volume EMA using the candle range position method. ±12 points. This captures intrabar volume directional bias as opposed to OBV's inter-bar accumulation bias.

Component 5 — HTF EMA Bias (up to ±18 points):
The higher timeframe EMA structure — fast EMA above slow EMA with close above fast EMA (bull) or the inverse (bear). ±18 points. This ensures the Flow Vector reflects the macro institutional direction, not just the current timeframe's local momentum.

Component 6 — Price vs Vector Line (up to ±15 points):
Whether the current close is above or below the KAMA Vector Line. ±15 points. Price above the Vector Line in a bull regime confirms the pullback has not reached the Vector Line yet (trend intact). Price below confirms the line has been reached or breached (potential reversal zone).

Flow Vector thresholds:
  • +40 to +100 — strong bull flow. Setup A (Trend Micro-Pullback) long entries require this minimum
  • +65 to +100 — extreme bull flow. Used as a fade signal when combined with upper balance band touch
  • -40 to -100 — strong bear flow. Setup A short entries require this minimum
  • -65 to -100 — extreme bear flow. Fade signal condition for lower band touches
  • -39 to +39 — neutral flow. Directional conviction insufficient for Trend regime entries


Flow Acceleration:
In addition to the absolute score, VECTOR checks whether the Flow Vector is currently accelerating — increasing for two consecutive bars (bull) or decreasing for two consecutive bars (bear). Acceleration is a hard requirement for Setup A (Trend Micro-Pullback) entries, ensuring the entry occurs when flow is building rather than stalling or reversing.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🕯 Scalping Candle Quality — The Pin Bar Filter

VECTOR applies a specific, tight candle quality standard for all entry types — the scalping pin bar. All four conditions must be simultaneously true:

Bull pin bar requirements:
  • Bullish close (close above open)
  • Lower wick covers at least 42% of the total bar range — the rejection of the low is dominant
  • Upper wick is at most 32% of the total range — no significant selling into the close
  • Body size at least 0.10× ATR — not a doji or near-doji
  • Close in the upper 28% of the bar range (upper quartile) — the bar closed strongly bullish


Bear pin bar requirements: The mirror conditions — upper wick dominant (42%+ of range), lower wick minimal (32% max), small minimum body, close in the lower quartile.

Why this specific candle quality standard for scalping: Scalping entries are executed in the wick of the signal candle — buying at the low of a bull pin bar, selling at the high of a bear pin bar. A candle that lacks a dominant rejection wick provides no clear structural fill level. The upper quartile close requirement for bulls ensures the rejection was decisive — not a bar that dipped into support and then closed mediocre. These parameters are significantly stricter than the standard 50% wick filter used in MERIDIAN and PIVOT, reflecting the precision required for scalping entries.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🏷 Four Setup Types — Regime-Gated Playbooks

VECTOR implements four distinct setup types, each activated only in the appropriate regime state. The active playbook is displayed on the dashboard as a PLAYBOOK row, telling you exactly which setups are available right now.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Setup A — Trend Micro-Pullback (Regime: Trend Bull or Trend Bear only)

The primary VECTOR scalp entry. Fires in Trend Bull regime for longs, Trend Bear for shorts.

Full condition stack for long:
  • Regime is Trend Bull (regime == 1)
  • Flow Vector is strongly bullish (≥ +40)
  • Flow Vector is accelerating (rising for two consecutive bars)
  • Price has touched the EMA 8 or Vector Line from above — the micro-pullback has reached the trend reference level. Touch tolerance is ±0.22× ATR (configurable)
  • A qualifying bull pin bar has formed at the touch
  • The recent 5-bar low has dipped into the EMA 8 / Vector Line zone (confirming the touch was genuine, not just proximity)
  • Price is not extended above the Vector Line by more than the maximum extension setting (default: 1.0× ATR) — the anti-chase filter
  • RSI(7) is between 40 and 70 — not already overbought, not in a capitulation zone


Why this is the core scalp setup: In a confirmed Trend Bull regime with accelerating flow, the EMA 8 and Vector Line are the natural pullback magnets. Institutional buyers who are long in the trend use these levels to add on dips. The pin bar at the level confirms they stepped in. The anti-extension filter prevents chasing a move that has already run 1× ATR above the Vector Line — exactly the stretch that precedes a deeper pullback.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Setup B — Micro Impulse Break (Regime: Trend or Balance)

A momentum continuation scalp that fires when price breaks out of a micro swing range with a qualifying body and volume delta confirmation.

Key conditions for long:
  • Regime is Trend Bull or Balance (the setup fires across both regimes as momentum can develop in either)
  • Price closes above the highest high of the last 4 bars (configurable lookback) on the previous bar — a genuine micro swing break
  • The break bar's body meets the minimum body threshold (default: 0.85× the impulse body minimum × ATR)
  • Volume delta is positive — buying pressure drove the break
  • A qualifying bull pin bar is present on the break bar
  • HTF bias aligns — long only when the higher timeframe confirms bullish
  • Price is not over-extended above the Vector Line (anti-chase filter)


What this setup captures: The breakout from a micro consolidation range with volume confirmation — the intrabar equivalent of a structure break. On a 1-minute chart, a 4-bar micro range that breaks with a strong body and bull delta is a clean scalp entry with a tight stop at the bottom of the range. In Balance regime, this setup provides the best entries because the market character does not support pullback trades but does support momentum breaks on sufficient flow.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Setup C — Range Fade / Band Extreme (Regime: Balance only)

The mean-reversion scalp. Fires only in Balance regime when price reaches the outer balance band with an exhausted or reversing Flow Vector.

Short fade conditions:
  • Regime is Balance (regime == 3)
  • Price has touched the upper balance band (within 0.08× ATR of the upper band)
  • The Flow Vector is either in extreme bull territory (≥ +65, meaning the move to the band is overextended) OR the flow is beginning to fade (Flow Vector is falling and was recently above +53)
  • A qualifying bear pin bar confirms the rejection at the band
  • RSI(7) is above 58 — confirming the RSI is elevated at the band touch, consistent with a reversal setup


Why band fades only fire in Balance: In a Trend Bull regime, price touching the upper balance band is a continuation event — the trend is simply pushing to the next level. Fading that in a trend produces the most reliable losses in scalping. Setup C is therefore hard-gated to Balance regime only, where the market has proven it is oscillating rather than trending, and the balance band genuinely represents a mean-reversion boundary.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Setup D — Vector Shift / Flow Zero-Cross (Off by default)

A legacy setup type that fires when the Flow Vector crosses from negative to positive (long) or positive to negative (short) with a strong body candle and positive volume delta. Off by default on fast timeframes because flow zero-crosses on M1–M5 produce excessive noise. Available for traders who want to experiment with flow momentum entries on H1+ timeframes where the zero-cross carries more structural weight.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🧠 The 7-Point Scalp-Weighted Confluence Score

VECTOR uses a setup-weighted scoring system specifically calibrated for scalping frequency and quality:

Score structure:
  • Setup Type (up to 2 points) — primary setups (Trend Micro-Pullback, Micro Impulse) score 2 points. Secondary setups (Range Fade, Vector Shift) score 1 point. This weighting reflects that Setup A and B have more prerequisite conditions and are inherently higher quality
  • Flow Acceleration (1 point) — Flow Vector is actively building in the signal direction over the last two bars. Ensures the entry coincides with momentum building, not stalling
  • HTF Bias (1 point) — higher timeframe EMA confirms the signal direction
  • Volume Expansion (1 point) — current bar volume exceeds the volume average by the configured minimum (default: 1.05×)
  • Non-Chop Market (1 point) — the market is not in Chop regime. This point is also enforced as a hard gate — signals cannot fire in Chop regardless of the score
  • RSI(7) Filter (1 point) — the 7-period RSI is in the acceptable zone for the signal direction (40–70 for longs, 30–60 for shorts)


Maximum score: 7. Default minimum: 4. The scalp-weighted system means that a Setup A or B entry with flow acceleration, HTF alignment, and volume can reach 5 points from the setup type, flow, HTF, and volume components alone — a clean high-quality signal. Setup C entries require more supporting factors to reach the threshold because their 1-point setup score means more of the other layers must confirm.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🛡 Anti-Chase & Quality Filters

VECTOR includes several anti-chase and quality gates specifically designed for scalping precision that do not appear in the other AlphaX indicators.

Extension Filter: No long signal fires if price is already above the Vector Line by more than the configured maximum extension (default: 1.0× ATR). No short signal fires if price is already below by that much. This single filter eliminates the most common scalping failure — entering a pullback after it has already run too far from the reference level, leaving insufficient room for the signal to develop before hitting the stop.

Dip/Rip Confirmation: For Setup A entries, the 5-bar lowest low (bull) or highest high (bear) must have reached within a tight ATR tolerance of the reference lines. This confirms that the touch was genuine — price actually dipped into the zone — rather than just being close to it without contacting it.

RSI(7) Micro Filter: A 7-period RSI gate blocks entries when RSI is already overbought (above 70 for longs) or in a knife-catch zone (below 40 for shorts). On scalping timeframes, entering a long when 7-bar RSI is already at 75 means you are entering after the move is exhausted. This filter alone dramatically reduces the worst class of setup A false signals — those that occur when price is touching the EMA 8 on the way back down through it rather than bouncing off it.

Flow Acceleration Requirement: Setup A requires the Flow Vector to be accelerating (not just positive) for two consecutive bars. A stale, high but flat Flow Vector indicates the move is decelerating — the opposite of the momentum condition that produces clean scalp continuations.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 Scalp Entry Reference — Wick-Based Positioning

Unlike the other AlphaX indicators where the entry is taken on the close or next open, VECTOR's entry reference is the rejection wick of the signal candle — specifically the bar's low (for bull signals) or high (for bear signals). This is the optimal scalp fill zone.

Why the wick, not the close: A scalp pin bar with a 42%+ lower wick has a significant low-to-close range. Entering at the close gives up nearly half that range unnecessarily. The institutional scalp entry is at the wick extreme — the exact level where buyers stepped in and stopped the selling. A limit order at the bar's low (bull) captures the optimal risk/reward because the stop goes below that low, and the full bar range is available as immediate profit space.

Entry reference visualization: A cross marker is plotted at the signal bar's low (bull) or high (bear) — the wick entry reference — distinct from the signal triangle. This gives you the precise price at which to place a limit order if you prefer limit entry over market-on-open execution.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Live Dashboard

The 17-row real-time dashboard displays the complete internal state across five sections.

REGIME
  • Market Regime — current regime state with icon: ⛔ CHOP — STAND ASIDE, ▲ TREND BULL, ▼ TREND BEAR, or ◆ BALANCE / RANGE. This is the primary trading context indicator
  • Playbook — the active setup playbook matching the current regime: NO TRADES, SCALP PULLBACK ▲, SCALP PULLBACK ▼, or SCALP FADE / BREAK. Tells you exactly which setup types can fire
  • Flow Vector — the live composite Flow Vector score with + or - sign. Yellow-green when strongly positive, red when strongly negative, neutral otherwise


METRICS
  • Efficiency — current Kaufman Efficiency Ratio value. Yellow-green when in trend territory (≥ threshold), orange when in chop territory (≤ chop max)
  • Chop Index — current Choppiness Index value. Orange when above the stand-aside threshold
  • ADX — current ADX value. Yellow-green when above the trend minimum
  • Vol Delta — ▲ BUYERS or ▼ SELLERS based on the current volume delta direction


FILTERS
  • HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
  • Session — ✓ ACTIVE or ✗ OFF


CONFLUENCE
  • Bull Score — live 0–7 score. Background highlights yellow-green when threshold is met and regime is not Chop
  • Bear Score — live 0–7 score. Background highlights red when threshold is met and regime is not Chop
  • Vector Line — the exact current KAMA Vector Line price, color-coded by Flow Vector strength


Live confluence label: During non-chop regimes, a small B x/7 · S x/7 label appears near the Vector Line on the current bar, updating in real time.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 Chart Visual System

  • KAMA Vector Line — the adaptive trend reference line, color-coded by Flow Vector strength. Bright yellow-green when bull flow is strong, bright red when bear flow is strong, fading to semi-transparent in neutral/weak territory
  • Balance Bands (upper, lower, midline) — the Bollinger-style bands used as reference for Balance regime and Setup C fade entries. Purple-tinted at low opacity
  • ▲ Label with setup tag (below bar, yellow-green) — bull scalp signal. Tag shows A, B, C, or D identifying which setup type fired. Tooltip shows the full setup description
  • ▼ Label with setup tag (above bar, red) — bear scalp signal
  • Entry Reference Cross (× marker) — plotted at the signal bar's low (bull) or high (bear) — the optimal scalp limit entry price
  • SL Guide (red dotted circles) — stop loss reference below the EMA 8 and Vector Line minimum (bull) or above (bear), plus ATR buffer
  • TP Guide (yellow-green dotted circles) — dynamically computed reward target at R multiple
  • Regime Change Labels (optional) — small labels at regime transition bars showing TREND ▲, TREND ▼, or BALANCE. Off by default — regime visible on dashboard
  • Live confluence label — B x/7 · S x/7 near the Vector Line on the current bar


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🚀 How to Trade with AlphaX VECTOR — Step by Step

Step 1 — Read the Regime First
  • Check the Market Regime row on the dashboard. ⛔ CHOP — do nothing, close the chart if needed. ◆ BALANCE — Setup B and C available. ▲ TREND BULL or ▼ TREND BEAR — Setup A is active
  • Check the Playbook row — it tells you exactly which setup type is currently firing-eligible
  • Note the Flow Vector value. Above +40 in Trend Bull is the optimal Setup A environment. Below +40 but still positive suggests the trend may be weakening


Step 2 — Prepare the Level
  • In Trend Bull, identify where the Vector Line is currently sitting (Vector Line on dashboard). This is your Setup A anchor level — watch for price to pull back toward it
  • Note the EMA 8 on the chart. For Setup A, price must touch either EMA 8 or the Vector Line — whichever is closest to price is the active support
  • In Balance, note where the upper and lower balance bands sit. These are the Setup C fade boundaries


Step 3 — Enter on the Signal Label
  • A ▲ label below the bar with setup tag [A] is the core scalp signal — Trend Micro-Pullback long. All conditions including regime, flow acceleration, line touch, pin bar, RSI, and extension filter are confirmed
  • The entry reference × marker shows the wick low — the optimal limit order price
  • The SL guide is at the minimum of EMA 8, Vector Line, and the bar low, minus ATR buffer. This is a tight structural stop designed for scalping
  • The TP guide is at the R-multiple target. Default 2.0R for a tight scalp stop produces a larger absolute target than most other AlphaX indicators due to the compressed ATR-based stops


Step 4 — Manage the Scalp
  • Scalp trades in VECTOR are short-duration by design — move the stop to breakeven after any meaningful move in your favor
  • Watch the Flow Vector on the live label — if it drops below +40 during a long trade, the bull flow is weakening. Consider taking profit early
  • If the regime changes to Chop during an open trade, take profit immediately — the market character has changed and the setup's underlying logic no longer applies
  • Setup A targets in strong Trend Bull regimes can be extended toward the band extremes. In strong trends, the first R-target is often just the beginning of a larger move


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Identifying Low-Quality Conditions — When Not to Trade

Stand aside when:
  • Market Regime shows ⛔ CHOP — this is the clearest possible signal to step back. No signals will fire, and any manual entries during chop carry statistically negative expectation on scalping timeframes
  • Chop Index above 61 on the dashboard — even if regime hasn't fully shifted to CHOP, a CI above 61 is a warning that market character is deteriorating. Reduce size or stop trading
  • Flow Vector is between -39 and +39 — the directional conviction is insufficient for Setup A. In this zone, the market is neither clearly bullish nor bearish at the flow level. Wait for the vector to commit above ±40
  • Flow Vector is high but flat (no acceleration) — a Flow Vector at +55 that has been flat for 5 bars means the momentum is stale. Setup A requires active acceleration, not just a high score. The signal will be blocked, but the absence of acceleration is itself a warning
  • HTF Bias opposes the signal direction — scalping against the higher timeframe institutional flow is the highest-risk scalp. If HTF shows BEAR and you are attempting Setup A longs, every entry is fundamentally counter-trend
  • RSI(7) is above 70 at a bull pin bar — the 7-bar RSI filter will block the signal, but if you see a bull pin at the Vector Line with RSI at 72, it is a warning that the touch is occurring after an overbought condition rather than at a healthy pullback
  • Regime changes rapidly between states — if the regime is cycling between Trend Bull and Balance or Balance and Chop multiple times per session, the market is in an indecisive transition phase. These transitions produce the most noise and the lowest signal quality across all setup types


The ideal VECTOR scalp setup:
  • Trend Bull or Trend Bear regime sustained for 5+ bars
  • Flow Vector at ±55 or above, actively accelerating
  • HTF aligned with regime direction
  • Price pulling back cleanly to the Vector Line / EMA 8 zone with a tight, contained range
  • Bull or bear pin bar with lower/upper wick of 50%+ of range, closing in the upper/lower quartile
  • RSI(7) between 45–60 for longs or 40–55 for shorts — the healthy pullback RSI zone
  • Volume above average, volume delta confirming direction
  • Score at 5/7 or higher


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key Features
  • 🧭 Three-metric regime classification engine — Kaufman Efficiency Ratio, Choppiness Index, and ADX combined to classify every bar as Trend Bull, Trend Bear, Balance, or Chop
  • 📊 Active playbook display — dashboard tells you exactly which setup type is eligible right now: SCALP PULLBACK ▲/▼, SCALP FADE / BREAK, or NO TRADES
  • 📈 KAMA Vector Line — adaptive moving average that tightens in trends and stabilizes in chop, providing the most accurate scalp reference line available
  • ⚡ 6-component Flow Vector — EMA Stack, KAMA Slope, OBV Slope, Volume Delta, HTF Bias, and Price vs Vector Line combined into a -100 to +100 directional conviction score
  • 🔴 Flow Acceleration detection — Setup A requires the Flow Vector to be actively building for two consecutive bars, blocking stale or decelerating flow entries
  • 🏷 Four regime-gated setup types — Setup A (Trend Micro-Pullback), Setup B (Micro Impulse Break), Setup C (Balance Band Fade), Setup D (Vector Shift, off by default)
  • 🕯 Strict scalping pin bar standard — lower/upper wick ≥ 42% of range, opposing wick ≤ 32%, minimum body, close in upper/lower quartile — the highest candle quality standard in the AlphaX suite
  • 🛡 Anti-chase extension filter — blocks signals when price has already moved too far from the Vector Line, eliminating chasing entries
  • 📍 Wick-based entry reference — × marker at the signal bar's wick extreme for optimal limit order placement
  • 🔢 RSI(7) micro filter — 7-period RSI gates block overbought longs and oversold shorts at the exact scalp entry bar
  • 📊 Live Efficiency, Choppiness, and ADX metrics on dashboard — the three regime classification inputs displayed with live values and color-coded thresholds
  • 🎨 Flow Vector–colored Vector Line — line color reflects directional conviction in real time from strong bull to neutral to strong bear
  • 📊 17-row live dashboard — Regime, Playbook, Flow Vector, Efficiency, Chop Index, ADX, Vol Delta, HTF Bias, Session, Confluence, and Vector Line price updated every bar
  • 🔔 5 alert conditions — long entry, short entry, chop warning, trend bull regime change, trend bear regime change
  • ⚙ Fully configurable — ER lookback and thresholds, CI length and maximum, ADX length and minimum, KAMA parameters, OBV and delta lengths, flow vector thresholds, all four setup enables, pullback tolerance, anti-chase extension, impulse body minimum, confluence minimum, HTF timeframe and EMAs, volume filter, session, SL/TP parameters, and all colors are independently adjustable


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Settings Reference

Regime Engine
  • ATR Length — ATR lookback for all ATR-relative calculations (default: 14)
  • Efficiency Ratio Length — Kaufman ER lookback period (default: 10)
  • ER Min for Trend Regime — minimum ER to qualify as trend (default: 0.35)
  • ER Max for Chop Regime — maximum ER that contributes to chop classification (default: 0.22)
  • Choppiness Index Length — CI calculation lookback (default: 14)
  • Chop Index — Stand Aside Above — CI threshold above which all signals are suppressed (default: 61.0)
  • ADX Length — ADX calculation lookback (default: 14)
  • ADX Min for Trend — minimum ADX for Trend Bull or Trend Bear classification (default: 20.0)
  • Balance Band Length / Mult — parameters for the balance band Bollinger calculation (defaults: 20 / 2.0)


Flow Vector
  • Vector Line (KAMA) Length — KAMA lookback period (default: 21)
  • KAMA Fast / KAMA Slow — KAMA smoothing constants (defaults: 2 / 30)
  • OBV Slope Length — lookback bars for OBV slope calculation (default: 10)
  • Volume Delta Length — EMA smoothing for volume delta estimation (default: 14)
  • Strong Vector Threshold — minimum absolute Flow Vector for strong directional condition (default: 40)
  • Extreme Vector (range fade) — Flow Vector level triggering the extreme condition for Setup C fades (default: 65)


Entries & Confluence (Scalping)
  • Setup A · Trend Micro-Pullback — toggle the primary trend scalp setup
  • Setup B · Micro Impulse Break — toggle the momentum continuation scalp
  • Setup C · Range Fade (band extreme) — toggle the balance band mean-reversion scalp
  • Setup D · Vector Shift (legacy) — toggle the flow zero-cross setup (default: off)
  • Pullback Touch Tolerance (xATR) — ATR tolerance for EMA 8 / Vector Line touch detection (default: 0.22)
  • Impulse Min Body (xATR) — minimum body size for Setup B impulse and Setup D shift candles (default: 0.55)
  • Max Extension from Vector (xATR) — maximum allowed distance from Vector Line before anti-chase blocks the signal (default: 1.0)
  • Micro Swing Lookback — bars for the Setup B micro swing high/low reference (default: 4)
  • Min Confluence Layers (of 7) — minimum score to fire a signal (default: 4)
  • Show Entry Signals — toggle signal labels
  • Show Confluence Label — toggle the live B/S score label near the Vector Line
  • Signal Cooldown (bars) — minimum bars between consecutive signals (default: 3)


Filters
  • HTF Trend Filter — toggle higher timeframe EMA alignment requirement
  • HTF Timeframe — higher timeframe for EMA data (default: 60-minute)
  • HTF Fast / Slow EMA — EMA periods on the HTF (defaults: 21 / 55)
  • Volume Confirm — toggle volume expansion requirement
  • Min Volume vs Avg — minimum volume ratio (default: 1.05)
  • Volume Avg Length — SMA length for volume baseline (default: 20)
  • Session Filter — toggle active hours restriction (default: off)
  • Active Session — configurable session window


Exit Guidance
  • Show SL / TP Guides — toggle stop and target circle plots
  • SL Distance (xATR) — ATR buffer added beyond the EMA 8 / Vector Line stop anchor (default: 0.85)
  • TP Reward (R) — take profit as a multiple of the actual risk (default: 2.0)


Display
  • Show Vector Line (KAMA) — toggle the adaptive trend reference line
  • Show Balance Bands — toggle the BB-style balance band plots
  • Show Regime Change Labels — toggle small regime transition labels on regime-change bars (default: off)
  • Show Dashboard — toggle the full dashboard
  • Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right


Colors
  • Bull / Bull Bright — yellow-green family for bullish signals and indicators
  • Bear / Bear Bright — red family for bearish signals
  • Chop / Caution — orange for chop regime and caution states
  • Balance / Vector — purple for balance bands, Vector Line neutral state, and equilibrium elements
  • SL Guide / TP Guide — stop and target circle colors
  • Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔔 Alert Conditions (5 total)

Entry Alerts
  • Vector Long — scalp long signal fired. Wick rejection entry confirmed with all regime and confluence conditions met
  • Vector Short — scalp short signal fired


Regime Alerts
  • Vector Chop Warning — market has entered Chop regime. Stand aside until regime clears
  • Vector Trend Bull — market has transitioned to Trend Bull regime. Watch Vector Line for Setup A pullback opportunities
  • Vector Trend Bear — market has transitioned to Trend Bear regime. Watch Vector Line for Setup A short pullback opportunities


All alert messages are formatted as const strings for clean webhook and notification platform integration.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 Recommended Settings by Instrument & Timeframe

The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M1–M5:
  • Cooldown at 3 bars — fast timeframes produce setups in rapid succession. A 3-bar cooldown prevents back-to-back signals on consecutive bars while allowing reasonable signal frequency
  • SL at 0.85× ATR — tight scalp stop anchored to the EMA 8 / Vector Line zone. The strict pin bar requirement ensures the signal bar's wick provides meaningful structural support, so the stop does not need to be large
  • TP at 2.0R — on M1–M5 with a 0.85× ATR stop, 2.0R produces a tight, achievable target during normal trending conditions
  • HTF at 60-minute — the standard intraday reference for M1–M5 scalping
  • Volume at 1.05× average — a very low multiplier appropriate for scalping timeframes where volume spikes are smaller and entry bars do not always show dramatic volume expansion


For other instruments or timeframes, adjust:
  • M15–H1 intraday — increase ER Length to 14, increase Chop Length to 20, increase CI stand-aside to 62, increase ADX minimum to 22, increase Cooldown to 6, increase TP to 2.5–3.0R
  • Crypto (BTC, ETH) — increase ATR Length to 20 for smoother ATR on high-volatility instruments, increase ER threshold to 0.40 for trend classification on more volatile assets
  • Indices (NAS100, US30) — use session filter restricted to market hours, increase ADX minimum to 22, consider enabling Setup D for the sharper zero-cross moves typical of index momentum
  • Fewer, higher-quality signals — raise Min Confluence to 5–6, increase ER trend minimum to 0.40, reduce CI stand-aside to 58, increase pullback touch tolerance slightly to 0.25 for tighter reference line proximity
  • Higher signal frequency — lower Min Confluence to 3, enable Setup D, reduce cooldown to 2, disable HTF filter on fast timeframes where the 60-minute EMA can lag too much


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

👥 Who This Is For
  • Pure scalpers on M1–M5 — VECTOR is the only indicator in the AlphaX suite specifically designed for sub-5-minute scalping. Every parameter — the pin bar standard, the wick entry reference, the tight ATR stop, the acceleration requirement, the anti-chase filter — is calibrated for fast-timeframe execution
  • 🧭 Regime-aware traders — traders who understand that different market conditions require different strategies will immediately recognize the value of having the regime identified and the playbook selected automatically
  • 🎯 Precision entry traders — the wick-entry reference and the strict pin bar requirements make VECTOR ideal for traders who want precise fill zones rather than market-on-close entries
  • 📊 Traders who study market microstructure — the Efficiency Ratio, Choppiness Index, and KAMA components expose the internal mechanics of market character in ways that standard trend indicators do not
  • 🔴 Traders who are burned by chasing — the anti-extension filter and RSI(7) gate are built specifically to stop the two most common scalping failures: entering too late after the move has already extended, and entering when momentum is actually exhausted
  • Traders who overtrade in choppy conditions — the Chop regime is the most powerful feature for discipline. When the dashboard shows ⛔ CHOP — STAND ASIDE, the system enforces what many traders cannot enforce themselves
  • 🏦 Gold and forex scalpers — the default settings are calibrated for XAUUSD and major forex pairs, which exhibit the clearest regime cycling of any liquid instruments due to their session-driven institutional flows


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📝 Notes
  • All signals are confirmed on bar close — the indicator is non-repainting by design. All regime classification, Flow Vector, setup conditions, and confluence scoring finalize on confirmed bars only
  • The KAMA Vector Line has a warm-up period equal to the KAMA Length setting. On charts with insufficient bar history, the Vector Line may not display correctly until enough bars accumulate
  • The Efficiency Ratio and Choppiness Index require their full lookback periods to produce accurate readings. On charts with fewer bars than the longest lookback, readings may be imprecise during the initial warm-up period
  • The anti-chase extension filter uses the distance from close to the Vector Line. In fast-moving scalp conditions, this filter can sometimes block entries that a discretionary trader would take. Increase the extension maximum if this becomes a frequent issue on your instrument
  • The signal cooldown of 3 bars is deliberately short for scalping timeframes. On M1 charts, 3 bars = 3 minutes — sufficient to prevent back-to-back duplicate signals while allowing rapid sequential setups in trending conditions
  • Setup D (Vector Shift) is off by default and is not recommended for M1–M5 scalping. Flow Vector zero-crosses on fast timeframes occur too frequently and with insufficient signal-to-noise ratio to be useful without additional filtering. Consider enabling it only on H1+ timeframes
  • The balance bands in VECTOR are Bollinger-style ATR-smoothed bands used purely as visual references and Setup C trigger levels. They are not the same as the ANCHOR adaptive bands and do not produce trailing stop functionality
  • The indicator does not track open positions or P&L and does not connect to any broker or account


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

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 scalpers who know that trading the wrong setup in the wrong regime is not a signal problem — it is a system architecture problem.

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.