PROTECTED SOURCE SCRIPT

Vector Sniper Pro

42
What it is
Vector Sniper (Simplified) is a single, original algorithm that flags impulsive “vector” moves only when volatility, volume, and structure align. It is not a mashup of other indicators; everything below is computed from raw OHLCV with a small, transparent ruleset.



Core idea (signal = force × participation × context)
1. Force (Volatility):
• We z-score true range: trZ = (ATR(1) - SMA(ATR(1), N)) / StDev(ATR(1), N).
• A move must exceed a user-set Volatility Z-Score.
2. Participation (Volume):
• We z-score raw volume: volZ = (Vol - SMA(Vol, N)) / StDev(Vol, N).
• Volume must also exceed a Volume Z-Score.
3. Context (Structure, Body, Imbalance, Traps):
• Body% filter: real body / range ≥ Min Body %.
• Delta-volume proxy: (bullVol − bearVol) / volume, where bullVol = volume*(close−low)/range and bearVol = volume*(high−close)/range. We require positive imbalance for bulls, negative for bears.
• Structure break (optional): price must take out the prior N-bar high/low.
• Trap detection (optional): spring/upthrust patterns defined by lower-low/upper-high followed by a close back inside.

If the above align, you get a Bull Vector (green) or Bear Vector (red). “Extreme” vectors require the same conditions at a higher multiple (Ext Mult).



Noise control (pre-signal gate)

Before a vector is allowed, a pre-signal score (0–7) must pass:
• Checks include spring/upthrust, no-supply/no-demand, imbalance, volume > average, VWAP side alignment, EMA trend alignment, proximity to structure break, and candle direction.
• You choose a minimum score, persistence (must occur ≥N times inside last M bars), cooldown after a pass, and hysteresis vs the opposite side.

This prevents one-off blips and keeps signals directional.



Optional confluence
• VWAP alignment: require price on the correct side and VWAP slope with it.
• EMA filter: require EMA trend agreement.
• HTF bias (optional): compare HTF close vs HTF EMA on a selected timeframe.
• Implemented with request.security and no look-ahead; bias updates when the higher timeframe bar closes.



Visuals & alerts
• Candle colors (5 total):
• Green = Bull Vector, Red = Bear Vector.
• Blue = Pre-Bull, Orange = Pre-Bear.
• Gray = Neutral.
• Markers (optional): diamonds = “Extreme” vectors; small triangles = pre-signals.
• Built-in alerts: Bull Vector, Bear Vector, Extreme Bull/Bear, Pre-Bull, Pre-Bear.
• Add from: Alerts → Condition → this script → choose event.



How to use (practical)
1. Start with defaults. Turn on VWAP and EMA filters; add HTF bias if you want fewer but cleaner signals.
2. Hunt for alignment: Pre-signal (blue/orange) → Vector (green/red) in the same direction.
3. Use your own risk model for entries/exits; the script does not place orders or compute stops/targets.



Inputs (plain English)
• ATR/Volume Periods & Z-Scores: sensitivity to volatility/participation.
• Extreme Multiplier: threshold for “Extreme” vectors.
• Structure Break (bars) & Traps: contextual confirms.
• Pre-signal gate: Min Score, Persistence (N in last M), Cooldown, Opposite-side lockout.
• Confluence: VWAP side, EMA trend, optional HTF bias (timeframe + EMA length).
• Visuals: candle painting and markers.



Design notes / limitations
• Signals evaluate on bar close. Intrabar they can form and cancel; for consistency, trade on closed bars.
• HTF bias is derived from closed HTF bars; no future data is used.
• This is an indicator, not financial advice. Backtest forward and manage risk.



Why this isn’t a “mashup”:
All components are purposeful and documented: z-score volatility + z-score volume (force & participation), body% and delta-volume (quality), structure & traps (context), and a scored, persistent pre-filter with VWAP/EMA/HTF alignment (noise control).

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。