PINE LIBRARY
已更新 Synapse_VSync_Lib

V-Sync (Volume Synchronization) is a multi-dimensional macro-confluence engine. It aggregates four objective market truths into a single synchronized bias (0.0 to 1.0) to filter signals and define market regime.
The Four Pillars of V-Sync
1. Base Volume (Temporal Flux)
Engine: Exponentially weighted volume flow.
Logic: up_volume / total_volume with a math.exp(-i/lookback) decay.
Utility: Capturing sustained momentum in raw participation. It filters out low-volume "fakeout" moves that lack broad participation.
2. Footprint (Order Flow Delta)
Engine: Micro-delta tracking (Institutional Tape).
Logic: Normalized ratio of aggressive buy orders vs sell orders, sourced from LTF footprint or synthetic body-to-wick estimation.
Utility: Identifying where "Smart Money" is actively committing capital in real-time.
3. TICK Data (Market Internals)
Engine: Exchange-wide breadth internals.
Index Mapping:
SPX/ES: NYSE:TICK
NQ/NDX: NASDAQ:TICKQ
Fidelity: Processes intrabar HT/LT extremes to capture high-speed institutional sweeps.
Commitment Levels: Benchmarked at 800 (MOO alignment), 1000 (Extreme), and 1200 (Climax).
4. Thermal Map (Structural Binning)
Engine: Range-based volume distribution (Heatmap).
Logic: 30-bin price-range analysis. Identifies if the current price is supported by "Buy Liquidity" below or capped by "Sell Liquidity" above.
Utility: Visualizing structural depth and identifying high-probability zones where price is likely to stick or bounce.
Interaction & Intelligence Modules
5. Interaction Tooltips
Engine: Dynamic string generator.
Logic: Aggregates pillars (V-Sync, TICK, Heatmap) and local interaction (Delta, OB Bias) into a human-readable forensic report.
Utility: Provides instant clarity on why a level is reacting (e.g., "Institutional Defense" vs "Passive Absorption").
6. Delta Aggregation (Defense vs Aggression)
Engine: Decaying session delta sum.
Logic: Tracks footprint delta at discrete price levels. Categorizes bias as:
Aggressive (A): Delta moves in the direction of the break (Push).
Defensive (D): Delta moves against the local price interaction (Absorption/Soaking).
Utility: Standardizing the interpretation of footprint across all Synapse indicators.
7. Universal Plot Auditing
Engine: Kinetic flux interaction logic.
Logic: Allows auditing of any technical plot line (Moving Averages, VWAP, Anchored Levels) for touches, cross-overs, and structural fidelity.
Utility: Enables the entire Synapse forensic suite to be applied to any existing indicator's data lines.
Library Architecture: Synapse_VSync_Lib
Key Functions
f_get_tick_source(): Auto-detects SPX vs NQ for correct internal sourcing.
f_calc_tick_extreme(): High-fidelity internal pressure tracking.
f_vsync_stack(): Blends all pillars into a weighted consensus.
HUD Representation
Indicators utilizing the full stack display V-STACK (instead of V-SYNC), signifying that Market Internals and Structural structural depth are being calculated alongside volume flow.
License: Open Source (MIT License)
The Four Pillars of V-Sync
1. Base Volume (Temporal Flux)
Engine: Exponentially weighted volume flow.
Logic: up_volume / total_volume with a math.exp(-i/lookback) decay.
Utility: Capturing sustained momentum in raw participation. It filters out low-volume "fakeout" moves that lack broad participation.
2. Footprint (Order Flow Delta)
Engine: Micro-delta tracking (Institutional Tape).
Logic: Normalized ratio of aggressive buy orders vs sell orders, sourced from LTF footprint or synthetic body-to-wick estimation.
Utility: Identifying where "Smart Money" is actively committing capital in real-time.
3. TICK Data (Market Internals)
Engine: Exchange-wide breadth internals.
Index Mapping:
SPX/ES: NYSE:TICK
NQ/NDX: NASDAQ:TICKQ
Fidelity: Processes intrabar HT/LT extremes to capture high-speed institutional sweeps.
Commitment Levels: Benchmarked at 800 (MOO alignment), 1000 (Extreme), and 1200 (Climax).
4. Thermal Map (Structural Binning)
Engine: Range-based volume distribution (Heatmap).
Logic: 30-bin price-range analysis. Identifies if the current price is supported by "Buy Liquidity" below or capped by "Sell Liquidity" above.
Utility: Visualizing structural depth and identifying high-probability zones where price is likely to stick or bounce.
Interaction & Intelligence Modules
5. Interaction Tooltips
Engine: Dynamic string generator.
Logic: Aggregates pillars (V-Sync, TICK, Heatmap) and local interaction (Delta, OB Bias) into a human-readable forensic report.
Utility: Provides instant clarity on why a level is reacting (e.g., "Institutional Defense" vs "Passive Absorption").
6. Delta Aggregation (Defense vs Aggression)
Engine: Decaying session delta sum.
Logic: Tracks footprint delta at discrete price levels. Categorizes bias as:
Aggressive (A): Delta moves in the direction of the break (Push).
Defensive (D): Delta moves against the local price interaction (Absorption/Soaking).
Utility: Standardizing the interpretation of footprint across all Synapse indicators.
7. Universal Plot Auditing
Engine: Kinetic flux interaction logic.
Logic: Allows auditing of any technical plot line (Moving Averages, VWAP, Anchored Levels) for touches, cross-overs, and structural fidelity.
Utility: Enables the entire Synapse forensic suite to be applied to any existing indicator's data lines.
Library Architecture: Synapse_VSync_Lib
Key Functions
f_get_tick_source(): Auto-detects SPX vs NQ for correct internal sourcing.
f_calc_tick_extreme(): High-fidelity internal pressure tracking.
f_vsync_stack(): Blends all pillars into a weighted consensus.
HUD Representation
Indicators utilizing the full stack display V-STACK (instead of V-SYNC), signifying that Market Internals and Structural structural depth are being calculated alongside volume flow.
License: Open Source (MIT License)
版本注释
v2Added:
f_delta_aggregator(current_sum, new_delta, decay)
f_delta_aggregator
Tracks and decays session delta sum for a specific level.
Parameters:
current_sum (float)
new_delta (float)
decay (float)
f_interpret_bias(is_support, delta)
f_interpret_bias
Categorizes interaction as Aggressive (A) or Defensive (D).
Parameters:
is_support (bool): True if price is above the level.
delta (float): Average or session delta at the level.
Returns: [bias_val, tag] where bias_val is direction and tag is "A" or "D".
f_vsync_tooltip(name, context, v_stack, t_bias, lvl_delta)
f_vsync_tooltip
Generates a standardized forensic tooltip for level interactions.
Parameters:
name (string)
context (string)
v_stack (float)
t_bias (float)
lvl_delta (float)
版本注释
v3Added:
f_audit_interaction(price, level, prox_ticks)
f_audit_interaction
Audits price interaction with any arbitrary level or plot (MA, VWAP, etc.).
Parameters:
price (float): Current price to check against (usually high or low).
level (float): The price level or plot value to audit.
prox_ticks (int)
Returns: [is_touch, is_break_up, is_break_dn]
版本注释
v4版本注释
v5Added:
f_is_cash_session()
f_is_cash_session
Returns true if current time is within NYSE/NASDAQ cash hours (09:30 - 16:00 ET).
版本注释
v6Updated:
f_vsync_stack(base_v, foot_v, heat_v, tick_h, tick_l, tick_c, tick_tier, w_base, w_foot, w_heat)
f_vsync_stack
Multi-source confluence aggregator. Returns [Vol Consensus, TICK Bias].
Parameters:
base_v (float): Base volume bias.
foot_v (float): Footprint delta bias.
heat_v (float): Thermal heatmap bias.
tick_h (float): High of the TICK ticker.
tick_l (float): Low of the TICK ticker.
tick_c (float): Close of the TICK ticker.
tick_tier (int): Normalization threshold.
w_base (float)
w_foot (float)
w_heat (float)
Removed:
f_is_cash_session()
f_is_cash_session
Returns true if current time is within NYSE/NASDAQ cash hours (09:30 - 16:00 ET).
版本注释
v7Added:
f_kernel_smooth(src, h, lookback, useAll, maxBars)
f_kernel_smooth
Gaussian kernel smoothing for non-linear signal processing.
Parameters:
src (float)
h (float)
lookback (int)
useAll (bool)
maxBars (int)
f_kalman_next(src, q, r, prevState, prevCov)
f_kalman_next
State-space filter for dynamic regime tracking.
Parameters:
src (float)
q (float)
r (float)
prevState (float)
prevCov (float)
Returns: [next_state, next_cov]
Pine脚本库
秉承TradingView的精神,作者已将此Pine代码作为开源库发布,以便我们社区的其他Pine程序员可以重用它。向作者致敬!您可以私下或在其他开源出版物中使用此库,但在出版物中重用此代码须遵守网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
Pine脚本库
秉承TradingView的精神,作者已将此Pine代码作为开源库发布,以便我们社区的其他Pine程序员可以重用它。向作者致敬!您可以私下或在其他开源出版物中使用此库,但在出版物中重用此代码须遵守网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。