Ask-Weighted Averages This indicator provides two price-based reference lines derived from volume dynamics within each bar. Specifically, it calculates a volume-weighted average price using only the portion of trading volume that occurred on the "ask" side, implying more aggressive buying activity. The logic behind this approach is to highlight potential support and resistance levels where buyers have shown greater conviction.
Key Features:
Ask-Weighted Average Prices:
Instead of using the entire trade volume, the lines focus on "ask volume" (volume associated with trades occurring at or near the ask price). This helps to spotlight areas where buyers have been dominant, potentially revealing more meaningful price levels for future market behavior.
Conditional vs. Continuous Lines:
Conditional Line: This line is only plotted if the dollar volume (a rough measure of trade value) exceeds a specified threshold, ensuring that the highlighted level is backed by substantial trading activity.
Continuous Line: A second line is always displayed, providing a running ask-weighted average price reference for additional context, regardless of dollar volume.
Supports Identifying Key Price Zones:
By focusing on where more motivated buyers have been active, the indicator helps traders identify potential inflection points in price, such as areas where the market might find support on pullbacks or resistance during rallies.
Overall, this indicator serves as a specialized tool for traders interested in volume-driven price analysis. It aims to refine the understanding of where buyers are most engaged and how that might shape future price movements.
Risks Associated with Trading:
No indicator can guarantee profitable trades or accurately predict future price movements. Market conditions are inherently unpredictable, and reliance on any single tool or combination of tools carries the risk of financial loss. Traders should practice sound risk management, including the use of stop losses and position sizing, and should not trade with funds they cannot afford to lose. Ultimately, decisions should be guided by a thorough trading plan and possibly supplemented with other forms of market analysis or professional advice.
Risks and Important Considerations:
• Not a Standalone Tool:
• This indicator should not be used in isolation. It is essential to incorporate additional technical analysis tools, fundamental analysis, and market context when making trading decisions.
• Relying solely on this indicator may lead to incomplete assessments of market conditions.
• Market Volatility and False Signals:
• Financial markets can be highly volatile, and indicators based on historical data may not accurately predict future movements.
• The indicator may produce false signals due to sudden market changes, low liquidity, or atypical trading activity.
• Risk Management:
• Always employ robust risk management strategies, including setting stop-loss orders, diversifying your portfolio, and not over-leveraging positions.
• Understand that no indicator guarantees success, and losses are a natural part of trading.
• Emotional Discipline:
• Avoid making impulsive decisions based on indicator signals alone.
• Emotional trading can lead to significant financial losses; maintain discipline and adhere to a well-thought-out trading plan.
• Continuous Learning and Adaptation:
• Stay informed about market news, economic indicators, and global events that may impact trading conditions.
• Continuously evaluate and adjust your trading strategies as market dynamics evolve.
• Consultation with Professionals:
• Consider seeking advice from financial advisors or professional traders to understand better how this indicator can fit into your overall trading strategy.
• Professional guidance can provide personalized insights based on your financial goals and risk tolerance.
Disclaimer:
Trading financial instruments involves substantial risk and may not be suitable for all investors. Past performance is not indicative of future results. This indicator is provided for informational and educational purposes only and should not be considered investment advice. Always conduct your own research and consult with a licensed financial professional before making any trading decisions.
Note: The effectiveness of any technical indicator can vary based on market conditions and individual trading styles. It's crucial to test indicators thoroughly using historical data and possibly paper trading before applying them in live trading scenarios.
在腳本中搜尋"vwap"
VWAP with 7EMA with ZonesThis is a script with 7 EMAs for every type of trades. This indicator also has the daily weekly and monthly zones. 20,50,100,200 EMAs being the best EMAs of all.
VWAP-ATR-SSLThis is an experimental idea to transform the original script created by @Fleite28 in a kind of SSL with volatility bands.
@Fleite28 has made all script and he have all credits, I just give him this idea.
I'm using this indicator to confirm:
1-potential bull trend (when you have 2x green lines with support)
2-potential bear trend (2x lines red - resistance)
3-consolidations (inside green support and red resistance).
Try to use this with a Market Profile Volume and some trend lines.
VWAP ATR ReversalThis script finds tops and bottoms using ATR and MVWAP. It works by signaling when price is far away from MVWAP and ATR therefore it is likely to reverse.
VWAP Relative Strength Index [CC]This is a custom indicator of mine that uses the volume weighted average price instead of the close price as the source for calculations of the relative strength index. Buy when the indicator line is green and sell when it is red.
This was a custom request so let me know if there are any other scripts you would like to see me do or if you want something custom done!
VWAP/CloseHey!
This time I'm going to introduce you to an indicator which catches volume spikes and its respect price change, to give an idea of the following price action.
The logic is pretty simple:
Value > 1 : High Volume that changed a lot the price, next price action will follow that trend.
Value < 1 : Low volume that changed a lot the price, trend is weak.
Value = 1 : Volume and price change is balanced, trend would continue based on the previous values.
If you have any doubt just comment!
φ
Market Regime | NY Session Killzones Indicator [ApexLegion]Market Regime | NY Session Killzones Indicator
Introduction and Theoretical Background
The Market Regime | NY Session Killzones indicator is designed exclusively for New York market hours (07:00-16:00 ET). Unlike universal indicators that attempt to function across disparate global sessions, this tool employs session-specific calibration to target the distinct liquidity characteristics of the NY trading day: Pre-Market structural formation (08:00-09:30), the Morning breakout window (09:30-12:00), and the Afternoon Killzone (13:30-16:00)—periods when institutional order flow exhibits the highest concentration and most definable technical structure. By restricting its operational scope to these statistically significant time windows, the indicator focuses on signal relevance while filtering the noise inherent in lower-liquidity overnight or extended-hours trading environments.
I. TECHNICAL RATIONALE: THE PRINCIPLE OF CONTEXTUAL FUSION
1. The Limitation of Acontextual Indicators
Traditional technical indicators often fail because they treat every bar and every market session equally, applying static thresholds (e.g., RSI > 70) without regard for the underlying market structure or liquidity environment. However, institutional volume and market volatility are highly dependent on the time of day (session) and the prevailing long-term risk environment.
This indicator was developed to address this "contextual deficit" by fusing three distinct yet interdependent analytical layers:
• Time and Structure (Macro): Identifying high-probability trading windows (Killzones) and critical structural levels (Pre-Market Range, PDH/PDL).
• Volatility and Scoring (Engine): Normalizing intraday momentum against annual volatility data to create an objective, statistically grounded AI Score.
• Risk Management (Execution): Implementing dynamic, volatility-adjusted Stop Loss (SL) and Take Profit (TP) parameters based on the Average True Range (ATR).
2. The Mandate for 252-Day Normalization (Z-Score)
What makes this tool unique is its 252-day Z-Score normalization engine that transforms raw momentum readings into statistically grounded probability scores, allowing the same indicator to deliver consistent, context-aware signals across any timeframe—from 1-minute scalping to 1-hour swing trades—without manual recalibration.
THE PROBLEM OF SCALE INVARIANCE
A high Relative Strength Index (RSI) reading on a 1-minute chart has a completely different market implication than a high RSI reading on a Daily chart. Simple percentage-based thresholds (like 70 or 30) do not provide true contextual significance. A sudden spike in momentum may look extreme on a 5-minute chart, but if it is statistically insignificant compared to the overall volatility of the last year, it may be a poor signal.
THE SOLUTION: CROSS-TIMEFRAME Z-SCORE NORMALIZATION
This indicator utilizes the Pine Script function request.security to reference the Daily timeframe for calculating the mean (μ) and standard deviation (σ) of a momentum oscillator (RSI) over the past 252 trading days (one year).
The indicator then calculates the Z-Score (Z) for the current bar's raw momentum (x): Z = (x - μ) / σ
Core Implementation: float raw_rsi = ta.rsi(close, 14) // x
= request.security(syminfo.tickerid, "D",
, // σ (252 days)
lookahead=barmerge.lookahead_on)
float cur_rsi_norm = d_rsi_std != 0 ? (raw_rsi - d_rsi_mean) / d_rsi_std : 0.0 // Z
This score provides an objective measurement of current intraday momentum significance by evaluating its statistical extremity against the yearly baseline of daily momentum. This standardized approach provides the scoring engine with consistent, global contextual information, independent of the chart's current viewing timeframe.
II. CORE COMPONENTS AND TECHNICAL ANALYSIS BREAKDOWN
1. TIME AND SESSION ANALYSIS (KILLZONES AND BIAS)
The indicator visually segments the trading day based on New York (NY) trading sessions, aligning the analysis with periods of high institutional liquidity events.
Pre-Market (PRE)
• Function: Defines the range before the core market opens. This range establishes structural support and resistance levels (PMH/PML).
• Technical Implementation: Uses a dedicated Session input (ny_pre_sess). The High and Low values (pm_h_val/pm_l_val) within this session are stored and plotted for structural reference.
• Smart Extension Logic: PMH/PML lines are automatically extended until the next Pre-Market session begins, providing continuous support/resistance references overnight.
NY Killzones (AM/PM)
• Function: Highlights high-probability volatility windows where institutional liquidity is expected to be highest (e.g., NY open, lunch, NY close).
• Technical Implementation: Separate session inputs (kz_ny_am, kz_ny_pm) are utilized to draw translucent background fills, providing a clear visual cue for timing.
Market Regime Bias
• Function: Determines the initial directional premise for the trading day. The bias is confirmed when the price breaks either the Pre-Market High (PMH) or the Pre-Market Low (PML).
• Technical Implementation: Involves the comparison of the close price against the predefined structural levels (check_h for PMH, check_l for PML). The variable active_bias is set to Bullish or Bearish upon confirmed breakout.
Trend Bar Coloring
• Function: Applies a visual cue to the bars based on the established regime (Bullish=Cyan, Bearish=Red). This visual filter helps mitigate noise from counter-trend candles.
• Technical Implementation: The Pine Script barcolor() function is tied directly to the value of the determined active_bias.
2. VOLATILITY NORMALIZED SCORING ENGINE
The internal scoring mechanism accumulates points from multiple market factors to determine the strength and validity of a signal. The purpose is to apply a robust filtering mechanism before generating an entry.
The score accumulation logic is based on the following factors:
• Market Bias Alignment (+3 Points): Points are awarded for conformance with the determined active_bias (Bullish/Bearish).
• VWAP Alignment (+2 Points): Assesses the position of the current price relative to the Volume-Weighted Average Price (VWAP). Alignment suggests conformity with the average institutional transaction price.
• Volume Anomaly (+2 Points): Detects a price move accompanied by an abnormally high relative volume (odd_vol_spike). This suggests potential institutional participation or significant order flow.
• VIX Integration (+2 Points): A score derived from the CBOE VIX index, assessing overall market stability and stress. Stable VIX levels add points, while high VIX levels (stress regimes) remove points or prevent signal generation entirely.
• ML Probability Score (+3 Points): This is the core predictive engine. It utilizes a Log-Manhattan Distance Kernel to compare the current market state against historical volatility patterns. The script implements a Log-linear distance formula (log(1 + |Δ|) ). This approach mathematically dampens the impact of extreme volatility spikes (outliers), ensuring that the similarity score reflects true structural alignment rather than transient market noise.
Core Technical Logic (Z-Score Normalization)
float cur_rsi_norm = d_rsi_std != 0 ? (raw_rsi - d_rsi_mean) / d_rsi_std : 0.0
• Technical Purpose: This line calculates the Z-Score (cur_rsi_norm) of the current momentum oscillator reading (raw_rsi) by normalizing it against the mean (d_rsi_mean) and standard deviation (d_rsi_std) derived from 252 days of Daily momentum data. If the standard deviation is zero (market is perfectly flat), it safely returns 0.0 to prevent division by zero runtime errors. This allows the AI's probability score to be based on the current signal's significance within the context of the entire trading year.
3. EXECUTION AND RISK MANAGEMENT (ATR MODEL)
The indicator utilizes the Average True Range (ATR) volatility model. This helps risk management scale dynamically with market volatility by allowing users to define TP/SL distances independently based on the current ATR.
Stop Loss Multiplier (sl_mult)
• Function: Sets the Stop Loss (SL) distance as a configurable multiple of the current ATR (e.g., 1.5 × ATR).
• Technical Logic: The price level is calculated as: last_sl_price := close - (atr_val * sl_mult). The mathematical sign is reversed for short trades.
Take Profit Multiplier (tp_mult)
• Function: Sets the Take Profit (TP) distance as a configurable multiple of the current ATR (e.g., 3.0 × ATR).
• Technical Logic: The price level is calculated as: last_tp_price := close + (atr_val * tp_mult). The mathematical sign is reversed for short trades.
Structural SL Option
• Function: Provides an override to the ATR-based SL calculation. When enabled, it forces the Stop Loss to the Pre-Market High/Low (PMH/PML) level, aligning the stop with a key institutional structural boundary.
• Technical Logic: The indicator checks the use_struct_sl input. If true, the calculated last_sl_price is overridden with either pm_h_val or pm_l_val, dependent on the specific trade direction.
Trend Continuation Logic
• Function: Enables signal generation in established, strong trends (typically in the Afternoon session) based on follow-through momentum (a new high/low of the previous bar) combined with a high Signal Score, rather than exclusively relying on the initial PMH/PML breakout.
• Technical Logic: For a long signal, the is_cont_long logic specifically requires checks like active_bias == s_bull AND close > high , confirming follow-through momentum within the established regime.
Smart Snapping & Cleanup (16:00 Market Close)
• Function: To maintain chart cleanliness, all trade boxes (TP/SL), AI Prediction zones, Killzone overlays (NY AM/PM), and Liquidity lines (PDH/PDL) are automatically "snapped" and cut off precisely at 16:00 NY Time (Market Close).
• Technical Logic: When is_market_close condition is met (hour == 16 and minute == 0), the script executes cleanup logic that:
◦ Closes active trades and evaluates final P&L
◦ Snaps all TP/SL box widths to current bar
◦ Truncates AI Prediction ghost boxes at market close
◦ Cuts off NY AM/PM Killzone background fills
◦ Terminates PDH/PDL line extensions
◦ Prevents visual clutter from extending into post-market sessions
4. LIQUIDITY AND STRUCTURAL ANALYSIS
The indicator plots key structural levels that serve as high-probability magnet zones or areas of potential liquidity absorption.
• Pre-Market High/Low (PMH/PML): These are the high and low established during the configured pre-market session (ny_pre_sess). They define the primary structural breakout level for the day, often serving as the initial market inflection point or the key entry level for the morning session.
• PDH (Previous Day High): The high of the calendar day immediately preceding the current bar. This represents a key Liquidity Pool; large orders are often placed above this level, making it a frequent target for stop hunts or liquidity absorption by market makers.
• PDL (Previous Day Low): The low of the calendar day immediately preceding the current bar. This also represents a key Liquidity Pool and a high-probability reversal or accumulation point, particularly during the Killzones.
FIFO Array Management
The indicator uses FIFO (First-In-First-Out) array structures to manage liquidity lines and labels, automatically deleting the oldest objects when the count exceeds 500 to comply with drawing object limits.
5. AI PREDICTION BOX (PREDICTIVE MODEL)
Function: Analyzes AI scores and volatility to project predicted killzone ranges and duration with asymmetric directional bias.
A. DIRECTIONAL BIAS (ASYMMETRIC EXPANSION)
The prediction model calculates directional probability using the ML kernel's 252-day Normalized RSI (Z-Score) and Relative Volume (RVOL). The prediction box dynamically adjusts its range based on this probability to provide immediate visual feedback on high-probability direction.
Bullish Scenario (ml_prob > 1.0):
• Upper Range: Expands significantly (1.5x multiplier) to show the aggressive upside target
• Lower Range: Tightens (0.5x multiplier) to show the invalidation level
• Visual Intent: The box is visibly skewed upward, immediately communicating bullish bias without requiring numerical analysis.
Bearish Scenario (ml_prob < -1.0):
• Upper Range: Tightens (0.5x multiplier) to show the invalidation level
• Lower Range: Expands significantly (1.5x multiplier) to show the aggressive downside target
• Visual Intent: The box is visibly skewed downward, immediately communicating bearish bias.
Neutral Scenario (-1.0 < ml_prob < 1.0):
Both ranges use balanced multipliers, creating a symmetrical box that indicates uncertainty.
B. DYNAMIC VOLATILITY BOOSTER (SESSION-BASED ADAPTATION)
The prediction box adjusts its volatility multiplier based on the current session and market conditions to account for intraday volatility patterns.
AM Session (Morning: 07:00-12:00):
• Base Multiplier: 1.0x (Neutral Base)
• Logic: Morning sessions often contain false breakouts and noise. The base multiplier starts neutral to avoid over-projecting during consolidation.
• Trend Booster: Multiplier jumps to 1.5x when:
Price > London Session Open AND AI is Bullish (ml_prob > 0), OR
Price < London Session Open AND AI is Bearish (ml_prob < 0)
• Logic: When the London trend (typically 03:00-08:00 NY time) aligns with the AI model's directional conviction, the indicator aggressively targets higher volatility expansion. This filters for "institutional follow-through" rather than random morning chop.
PM Session (Afternoon: 13:00-16:00):
• Fixed Multiplier: 1.8x
• Logic: The PM session, particularly the 13:30-16:00 ICT Silver Bullet window, often contains the "True Move" of the day. A higher baseline multiplier is applied to emphasize this session's significance over morning noise.
Safety Floor:
A minimum range of 0.2% of the current price is enforced regardless of volatility conditions.
• Purpose: Maintains the prediction box visibility during extreme low-volatility consolidation periods where ATR might collapse to near-zero values.
Volatility Clamp Protection:
Maximum volatility is capped at three times the current ATR value. During flash crashes, circuit breaker halts, or large overnight gaps, raw volatility calculations can spike to extreme levels. This clamp prevents prediction boxes from expanding to unrealistic widths.
Technical Implementation:
f_get_ai_multipliers(float _prob) =>
float _abs_prob = math.abs(_prob)
float _range_mult = 1.0
float _dur_mult = 1.0
if _abs_prob > 30
_range_mult := 1.8
else if _abs_prob > 10
_range_mult := 1.2
else
_range_mult := 0.7
C. PRACTICAL INTERPRETATION
• Wide Upper Range + Tight Lower Range: Strong bullish conviction. The model expects significant upside with limited downside risk.
• Tight Upper Range + Wide Lower Range: Strong bearish conviction. The model expects significant downside with limited upside.
• Symmetrical Range: Neutral/uncertain market. Wait for directional confirmation before entry.
• Large Box (Extended Duration): High-confidence prediction expecting sustained movement.
• Small Box (Short Duration): Low-confidence or choppy conditions. Expect quick resolution.
III. PRACTICAL USAGE GUIDE: METHODOLOGY AND EXECUTION
A. ESTABLISHING TRADING CONTEXT (THE THREE CHECKS)
The primary goal of the dashboard is to filter out low-probability trade setups before they occur.
• Timeframe Selection: Although the core AI is normalized to the Daily context, the indicator performs optimally on intraday timeframes (e.g., 5m, 15m) where session-based volatility is most pronounced.
• PHASE Check (Timing): Always confirm the current phase. The highest probability signals typically occur within the visually highlighted NY AM/PM Killzones because this is when institutional liquidity and volume are at their peak. Signals outside these zones should be treated with skepticism.
• MARKET REGIME Check (Bias): Ensure the signal (BUY/SELL arrow) aligns with the established MARKET REGIME bias (BULLISH/BEARISH). Counter-bias signals are technically allowed if the score is high, but they represent a higher risk trade.
• VIX REGIME Check (Risk): Review the VIX REGIME for overall market stress. Periods marked DANGER (high VIX) indicate elevated volatility and market uncertainty. During DANGER regimes, reducing position size or choosing a wider SL Multiplier is advisable.
B. DASHBOARD INTERPRETATION (THE REAL-TIME STATUS DISPLAY)
The indicator features a non-intrusive dashboard that provides real-time, context-aware information based on the core analytical engines.
PHASE: (PRE-MARKET, NY-AM, LUNCH, NY-PM)
• Meaning: Indicates the current institutional session time. This is derived from the customizable session inputs.
• Interpretation: Signals generated during NY-AM or NY-PM (Killzones) are generally considered higher-probability due to increased institutional participation and liquidity.
MARKET REGIME: (BULLISH, BEARISH, NEUTRAL)
• Meaning: The established directional bias for the trading day, confirmed by the price breaking above the Pre-Market High (PMH) or below the Pre-Market Low (PML).
• Interpretation: Trading with the established regime (e.g., taking a BUY signal when the regime is BULLISH) is the primary method. NEUTRAL indicates that the PMH/PML boundary has not yet been broken, suggesting market ambiguity.
VIX REGIME: (STABLE, DANGER)
• Meaning: A measure of overall market stress and stability, based on the CBOE VIX index integration. The thresholds (20.0 and 35.0 default) are customizable by the user.
• Interpretation: STABLE indicates stable volatility, favoring momentum trades. DANGER (VIX > 35.0) indicates extreme stress; signals generated in this environment require caution and often necessitate smaller position sizing.
SIGNAL SCORE: (0 to 10+ Points)
• Meaning: The accumulated score derived from the VOLATILITY NORMALIZED AI SCORING ENGINE, factoring in bias, VWAP alignment, volume, and the Z-Score probability.
• Interpretation: The indicator generates a signal when this score meets or exceeds the Minimum Entry Score (default 3). A higher score (e.g., 7+) indicates greater statistical confluence and a stronger potential entry.
AI PROBABILITY: (Bull/Bear %)
• Meaning: Directional probability derived from the ML kernel, expressed as a percentage with Bull/Bear label.
• Interpretation: Higher absolute values (>20%) indicate stronger directional conviction from the ML model.
LIVE METRICS SECTION:
• STATUS: Shows current trade state (LONG, SHORT, or INACTIVE)
• ENTRY: Displays the entry price for active trades
• TARGET: Shows the calculated Take Profit level
• ROI | KILL ZONE:
◦ For Active Trades: Displays real-time P&L percentage during NY session hours.
◦ At Market Close (16:00 NY): Since this is a NY session-specific indicator, any active position is automatically evaluated and closed at 16:00. The final result (VALIDATED or INVALIDATED) is determined based on whether the trade reached profit or loss at market close.
◦ Result Persistence: The killzone result (VALIDATED/INVALIDATED) remains displayed on the dashboard until the next NY AM KILLZONE session begins, providing a clear performance reference for the previous trading day.
Note: If a trade is still trending at 16:00, it will be force-closed and evaluated at that moment, as the indicator operates strictly within NY trading hours.
C. SIGNAL GENERATION AND ENTRY LOGIC
The indicator generates signals based on two distinct technical setups, both of which require the accumulated SIGNAL SCORE to be above the configured Minimum Entry Score.
Breakout Entry
• Trigger Condition: Price closes beyond the Pre-Market High (PMH) or Low (PML).
• Rationale: This setup targets the initial directional movement for the day. A breakout confirms the institutional bias by decisively breaking the first major structural boundary, making the signal high-probability.
Continuation Entry
• Trigger Condition: The market is already in an established regime (e.g., BULLISH), and the price closes above the high (or below the low) of the previous bar, while the SIGNAL SCORE remains high. Requires the Allow Trend Continuation parameter to be active.
• Rationale: This setup targets follow-through trades, typically in the afternoon session, capturing momentum after the morning's direction has been confirmed. This filters for sustainability in the established trend.
Execution: Execute the trade immediately upon the close of the bar that prints the BUY or SELL signal arrow.
D. MANAGING RISK AND EXITS
1. RISK PARAMETER SELECTION
The indicator immediately draws the dynamic TP/SL zones upon entry.
• Volatility-Based (Recommended Default): By setting the SL Multiplier (e.g., 1.5) and the TP Multiplier (e.g., 3.0), the indicator enforces a constant, dynamically sized risk-to-reward ratio (e.g., 1:2 in this example). This helps that risk management scales proportionally with the current market volatility (ATR).
• Structural Override: Selecting the Use Structural SL parameter fixes the stop-loss not to the ATR calculation, but to the more significant structural level of the PMH or PML. This is utilized by traders who favor institutional entry rules where the stop is placed behind the liquidity boundary.
2. EXIT METHODS
• Hard Exit: Price hits the visual TP or SL box boundary.
• Soft Exit (Momentum Decay Filter): If the trade is active and the SIGNAL SCORE drops below the Exit Score Threshold (default 3), it indicates that the momentum supporting the trade has significantly collapsed. This serves as a momentum decay filter, prompting the user to consider a manual early exit even if the SL/TP levels have not been hit, thereby preserving capital during low-momentum consolidation.
• Market Close Auto-Exit: At 16:00 NY time, any active trade is automatically closed and classified as VALIDATED (profit) or INVALIDATED (loss) based on current price vs. entry price.
IV. PARAMETER REFERENCE AND CONFIGURATION
A. GLOBAL SETTINGS
• Language (String, Default: English): Selects the language for the dashboard and notification text. Options: English, Korean, Chinese, Spanish, Portuguese, Russian, Ukrainian, Vietnamese.
B. SESSION TIMES (3 BOX SYSTEM)
• PRE-MARKET (Session, Default: 0800-0930): Defines the session range used for Pre-Market High/Low (PMH/PML) structural calculation.
• REGULAR (Morning) (Session, Default: 0930-1200): Defines the core Morning trading session.
• AFTERNOON (PM) (Session, Default: 1300-1600): Defines the main Afternoon trading session.
• Timezone (String, Default: America/New_York): Sets the timezone for all session and time-based calculations.
C. NY KILLZONES (OVERLAYS)
• Show NY Killzones (Bool, Default: True): Toggles the translucent background fills that highlight high-probability trading times (Killzones).
• NY AM Killzone (Session, Default: 0700-1000): Defines the specific time window for the first key liquidity surge (Open overlap).
• NY PM Killzone (Session, Default: 1330-1600): Defines the afternoon liquidity window, aligned with the ICT Silver Bullet and PM Trend entry timing.
• Allow Entry in Killzones (Bool, Default: True): Enables or disables signal generation specifically during the defined Killzone hours.
• Activate AI Prediction Box (Bool, Default: True): Toggles the drawing of the predicted target range boxes on the chart.
D. CORE SCORING ENGINE
• Minimum Entry Score (Int, Default: 3): The lowest accumulated score required for a Buy/Sell signal to be generated and plotted.
• Allow Trend Continuation (Bool, Default: True): Enables the secondary entry logic that fires signals based on momentum in an established trend.
• Force Ignore Volume (Bool, Default: False): Overrides the volume checks in the scoring engine. Useful for markets where volume data is unreliable or nonexistent.
• Force Show Signals (Ignore Score) (Bool, Default: False): Debug mode that displays all signals regardless of score threshold.
• Integrate CBOE:VIX (Bool, Default: True): Enables the connection to the VIX index for market stress assessment.
• Stable VIX (<) (Float, Default: 20.0): VIX level below which market stress is considered low (increases score).
• Stress VIX (>) (Float, Default: 35.0): VIX level above which market stress is considered high (decreases score/flags DANGER).
• Use ML Probability (Bool, Default: True): Activates the volatility-normalized AI Z-Score kernel. Disabling this removes the cross-timeframe normalization filter.
• Max Learning History (Int, Default: 2000): Maximum number of bars stored in the ML training arrays.
• Normalization Lookback (252 Days) (Int, Default: 252): The number of DAILY bars used to calculate the Z-Score mean and standard deviation (representing approximately 1 year of data).
E. RISK MANAGEMENT (ATR MODEL)
• Use Structural SL (Bool, Default: False): Overrides the ATR-based Stop Loss distance to use the Pre-Market High/Low as the fixed stop level.
• Stop Loss Multiplier (x ATR) (Float, Default: 1.5): Defines the Stop Loss distance in multiples of the current Average True Range (ATR).
• Take Profit Multiplier (x ATR) (Float, Default: 3.0): Defines the Take Profit distance in multiples of the current Average True Range (ATR).
• Exit Score Threshold (<) (Int, Default: 3): The minimum score below which an active trade is flagged for a Soft Exit due to momentum collapse.
F. VISUAL SETTINGS
• Show Dashboard (Bool, Default: True): Toggles the real-time data panel.
• Show NY Killzones (Bool, Default: True): Toggles killzone background fills.
• Show TP/SL Zones (Bool, Default: True): Toggles the drawing of Take Profit and Stop Loss boxes.
• Show Pre-Market Extensions (Bool, Default: True): Extends PM High/Low lines across the entire chart for support/resistance reference.
• Activate AI Prediction Box (Bool, Default: True): Enable or disable the predictive range projection.
• Light Mode Optimization (Bool, Default: True): Toggles dashboard and plot colors for optimal visibility on white (light) chart backgrounds.
• Enforce Trend Coloring (Bool, Default: True): Forces candle colors based on Market Regime (Bullish=Cyan, Bearish=Pink) to emphasize trend direction.
• Label Size (String, Default: Normal): Options: Tiny, Small, Normal.
G. LIQUIDITY POOLS (PDH/PDL)
• Show Liquidity Lines (Bool, Default: True): Toggles the display of the Previous Day High (PDH) and Low (PDL) lines.
• Liquidity High Color (Color, Default: Green): Color setting for the PDH line.
• Liquidity Low Color (Color, Default: Red): Color setting for the PDL line.
🔔 ALERT CONFIGURATION GUIDE
The indicator is equipped with specific alert conditions.
How to Set Up an Alert:
Click the "Alert" (Clock icon) in the top TradingView toolbar.
Select "Market Regime NY Session " from the Condition dropdown menu.
Choose one of the specific trigger conditions below depending on your strategy:
🚀 Available Alert Conditions
1. BUY (Long Entry)
Trigger: Fires immediately when a confirmed Bullish Setup is detected.
Conditions: Market Bias is Bullish (or valid Continuation) + Signal Score ≥ Minimum Entry Score.
Usage: Use this alert to open new Long positions or close existing Short positions.
2. SELL (Short Entry)
Trigger: Fires immediately when a confirmed Bearish Setup is detected.
Conditions: Market Bias is Bearish (or valid Continuation) + Signal Score ≥ Minimum Entry Score.
Usage: Use this alert to open new Short positions or close existing Long positions.
V. IMPORTANT TECHNICAL LIMITATIONS
⚠️ Intraday Only (Timeframe Compatibility)
This indicator is strictly designed for Intraday Timeframes (1m to 4h).
Daily/Weekly Charts: The session logic (e.g., "09:30-16:00") cannot function on Daily bars because a single bar encompasses the entire session. Session boxes, TP/SL zones, and AI prediction boxes will NOT draw on the Daily timeframe. Only the PDH/PDL liquidity lines remain visible on Daily charts. This is expected behavior, not a limitation.
Maximum Supported Timeframe: All visual components (session boxes, killzone overlays, TP/SL zones, AI prediction boxes) are displayed up to the 4-hour timeframe. Above this timeframe, only PDH/PDL lines and the dashboard remain functional.
⚠️ Drawing Object Limit (Max 500)
A single script can display a maximum of 500 drawing objects (boxes/lines) simultaneously.
On lower timeframes (e.g., 1-minute), where many signals and session boxes are generated, older history (typically beyond 10-14 days) will automatically disappear to make room for new real-time data.
For deeper historical backtesting visualization, switch to higher timeframes (e.g., 15m, 1h).
The indicator implements FIFO array management to comply with this limit while maintaining the most recent and relevant visual data.
VI. PRACTICAL TRADING TIPS AND BEST PRACTICES
• Killzone Confirmation: The highest statistical validity is observed when a high-score signal occurs directly within a visible NY AM/PM Killzone. Use the Killzones as a strict time filter.
• Liquidity Awareness (PDH/PDL): Treat the Previous Day High (PDH) and Low (PDL) lines as magnets. If your dynamic Take Profit (TP) is placed just above PDH, consider adjusting your target slightly below PDH or utilizing the Soft Exit, as liquidity absorption at these levels often results in sudden, sharp reversals that stop out a trade just before the target is reached.
• VIX as a Position Sizer: During DANGER VIX regimes, the resulting high volatility means the ATR value will be large. It is prudent to either reduce the SL Multiplier or, more commonly, reduce the overall position size to maintain a constant currency risk exposure per trade.
• Continuation Filter Timing: Trend Continuation signals are most effective during the Afternoon (PM) session when the morning's directional breakout has had time to establish a strong, clear, and sustainable trend. Avoid using them in the initial AM session when the direction is still being contested.
• 16:00 Market Close Rule: All trades, boxes, and lines are automatically cleaned up at 16:00 NY time. This prevents overnight chart clutter and maintains visual clarity.
VII. DISCLAIMER & RISK WARNINGS
• Educational Purpose Only
This indicator, including all associated code, documentation, and visual outputs, is provided strictly for educational and informational purposes. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments.
• No Guarantee of Performance
Past performance is not indicative of future results. All metrics displayed on the dashboard (including "ROI" and trade results) are theoretical calculations based on historical data. These figures do not account for real-world trading factors such as slippage, liquidity gaps, spread costs, or broker commissions.
• High-Risk Warning
Trading cryptocurrencies, futures, and leveraged financial products involves a substantial risk of loss. The use of leverage can amplify both gains and losses. Users acknowledge that they are solely responsible for their trading decisions and should conduct independent due diligence before executing any trades.
• Software Limitations
The software is provided "as is" without warranty. Users should be aware that market data feeds on analysis platforms may experience latency or outages, which can affect signal generation accuracy.
Free Stock ScreenerMissing great trade opportunities is annoying, and unless you have 12 screens or only trade one market, you are missing a lot of trades. To fix that, we created this free stock screener so you get notified instantly of potential great trading conditions in real time, right on your chart.
You get notified of trading benchmarks being met by the value being displayed on the scanner as well as a color change so that it grabs your attention and makes you aware that you should take a look at the other market and look for a potential trade. It also has built in alerts so you can have an alert notification go off when any of your trading conditions are met instead of needing to watch the scanner for color changes.
The screener will change the ticker symbol background color to red green when price is above or below the previous daily range and above or below both VWAPs. This signals that the ticker is trending, which typically means it is a great time to trade that market and follow the trend.
This free stock screener allows you to scan up to 10 different markets at the same time for various different conditions so you always know what is going on with your favorite trading symbols. If you want to scan more tickers, just add the indicator to your chart again and change the table position to the other side of the screen and update the tickers on the 2nd screener, allowing you to have 20 tickers at a time.
The scanner can be fully customized by changing the markets that it screens and turning on or off as many of them as you would like. You can also turn on or off any of the different data sets so that you only get information about trading conditions that matter to you.
The screener can provide data on any type of market, such as stocks, crypto, futures, forex and more. Each ticker can be adjusted to whatever market you would like it to scan for data in the settings panel, the only limitation is that it will not provide data for the VWAP and volume trend score if the ticker you are screening does not provide volume data.
Screener Features
The scanner will provide the following types of data for each ticker that is turned on:
Volume - Provides a volume score compared to the average volume and notifies you of higher than normal volume and volume spikes on individual bars by changing colors.
Volatility - Provides a volatility score compared to the average volatility and notifies you of higher than normal volatility by changing colors.
Oscillator - Choose between the RSI or CCI. The value of that oscillator will be displayed and will notify you when values are in extreme ranges such as overbought or oversold conditions according to the threshold values you enter in the settings panel. When those thresholds have been breached, you will be notified by it changing color.
Big Candles - Compares the current candle to average previous candle sizes, and changes color to notify you of big candles including a big top wick, big bottom wick, big candle body and big candle high to low range.
Daily Level Touches & Trends - Calculates and displays various daily candle and intraday open price levels that act as support and resistance. Notifies you when price is touching any of the daily levels that are turned on. The levels you can have on are as follows: previous day high, previous day low or previous day open. It also will notify you when price is touching the current day’s open, NY 930am open, Asia 8pm open, London 2am open and NY midnight 12am open. It will also say “Above” if price is above the previous day’s high or it will say “Below” if price is below the previous day’s low. The color of the cell will also change when a level touch is happening or price is above the previous day high or below the previous day low.
VWAP - Choose from 2 different VWAP lengths, default settings are daily and weekly VWAPs. You will get notified if price touches either of the VWAPs and they will also say “Above” or “Below” if price is currently above or below each VWAP.
How To Use The Screener To Help You Trade
The main purpose of the screener is to scan other markets and notify you of potential good trading opportunities such as price bouncing off of the daily levels or VWAPs. It can also be used to know when price is trending according to the VWAPs and daily levels. Lastly, you can use it to know how the volume and volatility trends are currently which gives you more confidence in taking a trade with this data when volume and volatility are present.
Volume Score
When volume is high, this represents a good time to trade because there are many market participants and price is likely to be volatile while there is high volume which can present a lot of good trade setups for you to take.
The volume score shown on the screener measures the current volume trend compared to previous volume trends and calculates that into a score based on 100 being the same as the previous volume trend. So any value above 100 means it is high volume and any value less than 100 means it is lower volume than normal.
In the settings panel, you can adjust the volume threshold that needs to be met for a volume notification to show up. The default setting is at 120, so you will get notified when the current volume trend score is 120 or higher or you can adjust that threshold value to whatever value you prefer.
It also will notify you when there is a volume spike on the current bar. This is determined by calculating an average of the recent volume totals and then checking to see if the current bar is greater than or equal to that average multiplied by 3. So if a single bar has volume that is greater than 3 times what the average volume is, then you will get a notification that says “Spike” to make you aware of that volume spike.
The volume trend threshold, volume spike multiplier and lookback length for the average volume used in volume spike calculations can all be adjusted in the settings panel to fit your desired preferences.
Volatility Score
High volatility can mean it is a great time to trade because the market is moving quickly and providing large enough movements that you can get in and out in a short amount of time, while still accruing decent sized trade PnL.
The volatility score will calculate the current volatility for each market compared to previous conditions and then divide the current volatility by the average volatility to give you a volatility score. Anything over 100 means the market is decently volatile and you should look at that market to find potential trade setups to execute on. Anything below 100 means the market is not very volatile and it is usually best to just wait until volatility returns before you start trading again.
The screener will notify you when the volatility score is above the threshold you set. The default value is set to 90, but can be adjusted to your preference. Pay attention to any market that shows an alert and take a look at that chart because the high volatility may present a good trade setup for you in the near future.
Oscillator Score
The oscillator data can be switched between Relative Strength Index(RSI) and Commodity Channel Index(CCI).
The RSI provides a value between 0 and 100 that indicates the momentum and strength of the recent price action. Many traders use the extremes of the 0-100 range to signal overbought or oversold conditions and use that as a sign to look for price to reverse in the near future. The typical values used for this and the default settings to provide notifications are: 70 for overbought and 30 for oversold. The scanner will notify you when the RSI value is considered overbought or oversold so you know to take a look at the chart and analyze if it is ready for a trade to be taken.
The CCI provides a value that can be used to determine the trend strength of the underlying asset when the oscillator moves above 100 or below -100. These extreme values are outside of the normal accumulation range and signify that price is moving strongly in that direction so it may be a good time to take a trade in the direction of the trend. The scanner will show you the value of the CCI for each market and notify you if that value is above 100 or below -100.
Both RSI and CCI settings can be adjusted in the settings panel to your desired settings so you have the exact oscillator settings you prefer to use as well as the exact values that you want to use for being notified.
Big Candles
Big candles can mean that many traders are buying or selling at the same time and many times indicate a good signal to trade in that same direction. That is why we included this calculation in the screener, so you are always aware when a large candle prints.
It calculates the average size of the recent candles and then uses that average as the benchmark to determine if the current candle is considered big and worthy of notifying you to take a look at that chart.
You can adjust the multiplier used for the big candle threshold to whatever you desire, but the default setting is 3 which means the candle will be considered big and notify you if it is 3 times as large as an average candle.
The big candles data will track the following candle values and notify you with these labels:
High to Low candle size = HL
Candle Body from open to close candle size = OC
Top Wick size = TW
Bottom Wick size = BW
Daily Level Touches & Trend
Daily level touches are excellent levels to watch for price to bounce because they often act as support and resistance levels for intraday trading. The scanner will track each market and notify you when the current candle is touching any of the daily levels that you have turned on in the settings panel.
The main levels that are turned on by default and are useful for all markets and how they will be labeled on the scanner are as follows:
Previous Day High = High
Previous Day Low = Low
Previous Day Open = < Open
Previous Day Close = Close
Current Day Open = Open
We also included some extra levels that are useful for futures traders. They are as follows:
NY 930am Open = 930am
NY 12am Midnight Open = 12am
Asia Open at 8pm NY time = Asia
London Open at 2am NY Time = London
Watch how price reacts to these levels and then trade the bounces off of these levels if the price action confirms that it is going to respect that level.
When price is currently above the previous day high, the scanner will say “Above” and show a green color, indicating a bullish trend and that price is above the previous daily candle’s high.
When price is currently below the previous day low, the scanner will say “Below” and show a red color, indicating a bearish trend and that price is below the previous daily candle’s low.
Pay attention to when price is trending above or below the previous daily candle as those trends can provide excellent trend trading opportunities.
The daily levels that you have turned on in the settings will also show as lines on the chart and include a label next to them, identifying each level so you know what each line represents. You can turn on or off all of the lines shown on the chart in the main settings or turn them off one by one in the style panel of the settings. Labels can also be turned on or off for all of the lines in the main settings panel. You can adjust the label positioning in the Label Offset section of the settings panel.
VWAP Touches & Trend
VWAP stands for volume weighted average price and is a very popular tool that traders use to determine trend direction based on volume as well as an excellent level to trade price bounces off of.
The typical VWAP time period used is Daily, which means the volume weighted average price will reset at the beginning of a new day. We set the first VWAP to be the daily VWAP by default and the second one to be the weekly VWAP. You can adjust both of the time periods to be any of the provided time lengths that you choose.
The screener will show “Above” with a green background color when price is above the VWAP, indicating a bullish trend. It will show “Below” with a red background color when price is below the VWAP, indicating a bearish trend. When both VWAPs are showing Above or Below, you can expect price to trend in that direction, so look for pullbacks you can trade in the direction of the trend. If the VWAPs are showing different directions, then you should expect to bounce back and forth between the VWAPs, but be careful and watch out for price to break beyond either one and start a trend.
When the current candle is touching the VWAP, the scanner will change colors and say VWAP to notify you that price is touching the VWAP and you should look at that chart and analyze the market for a potential bounce off of the VWAP to trade.
Trending Market Signals
Strong trends are excellent markets to trade and can many times provide excellent trading opportunities that don’t require expert price action reading skills to be able to take winning trades from. That is why we included a signal to notify you of a strong trending market.
The strong trending market will show up as a green or red background color for the ticker name. If the color of the ticker name is green, it is notifying you that the price is above the previous daily high, above VWAP 1 and above VWAP 2 and is a good market to look for bullish trend trades. If the color of the ticker name is red, it is notifying you that the price is below the previous daily low, below VWAP 1 and below VWAP 2 and is a good market to look for bearish trend trades.
Changing The Tickers It Scans
To change the tickers that the indicator scans, scroll near the bottom of the settings panel and select the ticker symbol you want to update and then search for the exact symbol you want to use. If you want to scan less tickers, then just turn some of the tickers off that you don’t need.
Scanning More Than 10 Tickers
If you want to scan more than 10 tickers, you can add the scanner to your chart again and then just change the table position to the other side of the screen. This will allow you to scan 10 more tickers that will show up separately. Then if you want even more, just add the indicator to your chart again and update the table position until you have as many markets as you want. The table position setting can be found at the bottom of the main settings panel.
Alerts
The screener has alerts that can be used to notify you when any of the data set thresholds have been met or if price is touching one of the levels. You can set alerts for the following events:
Bullish Trend Alert - Price is above the previous daily high and above both VWAPs.
Bearish Trend Alert - Price is below the previous daily low and below both VWAPs.
High Volume Alert - Volume is higher than the threshold or a volume spike is detected.
High Volatility Alert - Volatility is higher than the threshold.
Oscillator Is Extended Alert - Oscillator value has exceeded the upper or lower threshold.
Big Candle Alert - A big candle has been detected.
Daily Level Touch Alert - One of the daily levels that is turned on is being touched.
VWAP Touch Alert - One of the 2 VWAPs are being touched.
An alert will trigger when any one of tickers on your scanner meets the alert conditions, so when you see the alert, you will need to go to your chart and look at the scanner to see which ticker it was and then navigate to that chart to look for potential trade setups.
The alerts will use the exact same settings you have configured in the settings panel to send you alert notifications. With normal settings, this could give you a lot of alerts, so if you only want alerts to fire when abnormal conditions are being met, try setting up a second screener on your chart that has very high threshold values and only has the most important level touches on. Then turn the setting "Do Not Show The Screener On The Chart" to off so the calculations will still run and fire alerts, but won't clog up your charts. This way you can only get alert notifications when major events happen but still have your normal screener settings available on your chart.
Markets This Can Be Used On
This screener uses the price action and volume data so you can use it to scan any type of market you would like as long as the ticker you are scanning has price and volume data feeds. If a market does not have volume data, then it will just show NaN in the volume row and the VWAP rows will not show anything.
Day’s Open ForecastOverview
This Pine Script indicator combines two primary components:
1. Day’s Open Forecast:
o Tracks historical daily moves (up and down) from the day’s open.
o Calculates average up and down moves over a user-defined lookback period.
o Optionally includes standard deviation adjustments to forecast potential intraday levels.
o Plots lines on the chart for the forecasted up and down moves from the current day's open.
2. Session VWAP:
o Allows you to specify a custom trading session (by time range and UTC offset).
o Calculates and plots a Volume-Weighted Average Price (VWAP) during that session.
By combining these two features, you can gauge potential intraday moves relative to historical behavior from the open, while also tracking a session-specific VWAP that can act as a dynamic support/resistance reference.
How the Code Works
1. Collect Daily Moves
o The script detects when a new day starts using time("D").
o Once a new day is detected, it stores the previous day’s up-move (dayHigh - dayOpen) and down-move (dayOpen - dayLow) into arrays.
o These arrays keep track of the last N days (default: 126) of up/down move data.
2. Compute Statistics
o The script computes the average (f_average()) of up-moves and down-moves over the stored period.
o It also computes the standard deviation (f_stddev()) of up/down moves for optional “forecast bands.”
3. Forecast Lines
o Plots the current day’s open.
o Plots the average forecast lines above and below the open (Avg Up Move Level and Avg Down Move Level).
o If standard deviation is enabled, plots additional lines (Avg+StdDev Up and Avg+StdDev Down).
4. Session VWAP
o The script detects the start of a user-defined session (via input.session) and resets accumulation of volume and the numerator for VWAP.
o As each bar in the session updates, it accumulates volume (vwapCumulativeVolume) and a price-volume product (vwapCumulativeNumerator).
o The session VWAP is then calculated as (vwapCumulativeNumerator / vwapCumulativeVolume) and plotted.
5. Visualization Options
o Users can toggle standard deviation usage, historical up/down moves plotting, and whether to show the forecast “bands.”
o The vwapSession and vwapUtc inputs let you adjust which session (and time zone offset) the VWAP is calculated for.
________________________________________
How to Use This Indicator on TradingView
1. Create a New Script
o Open TradingView, then navigate to Pine Editor (usually found at the bottom of the chart).
o Copy and paste the entire code into the editor.
2. Save and Add to Chart
o Click Save (give it a relevant title if you wish), then click Add to chart.
o The indicator will appear on your chart with the forecast lines and VWAP.
o By default, it is overlayed on the price chart (because of overlay=true).
3. Customize Inputs
o In the indicator’s settings, you can:
Change lookback days (default: 126).
Enable or disable standard deviation (Include Standard Deviation in Forecast?).
Adjust the standard deviation multiplier.
Choose whether to plot bands (Plot Bands with Averages/StdDev?).
Plot historical moves if desired (Plot Historical Up/Down Moves for Reference?).
Set your custom session and UTC offset for the VWAP calculation.
4. Interpretation
o “Current Day Open” is simply today’s open price on your chart.
o Up/Down Move Lines: Indicate a potential forecast based on historical averages.
If standard deviation is enabled, the second set of lines acts as an extended range.
o VWAP: Helpful for determining intraday price equilibrium over the specified session.
Important Notes / Best Practices
• The script only updates the historical up/down move data once per day (when a new day starts).
• The VWAP portion resets at the start of the specified session each day.
• Standard deviation multiplies the average up/down range, giving you a sense of “volatility range” around the day’s open.
• Adjust the lookback length (dayCount) to balance how many days of data you want to average. More days = smoother but possibly slower to adapt; fewer days = more reactive but potentially less reliable historically.
Educational & Liability Disclaimers
1. Educational Disclaimer
o The information provided by this indicator is for educational and informational purposes only. It is a technical analysis tool intended to demonstrate how to use historical data and basic statistics in Pine Script.
2. No Financial Advice
o This script does not constitute financial or investment advice. All examples and explanations are solely illustrative. You should always do your own analysis before making any investment decisions.
3. No Liability
o The author of this script is not liable for any losses or damages—monetary or otherwise—that may occur from the application of this script.
o Past performance does not guarantee future results, and you should never invest money you cannot afford to lose.
By adding this indicator to your TradingView chart, you acknowledge and accept that you alone are responsible for your own trading decisions.
Enjoy using the “Day’s Open Forecast” and Session VWAP for better market insights!
LibVPrfLibrary "LibVPrf"
This library provides an object-oriented framework for volume
profile analysis in Pine Script®. It is built around the `VProf`
User-Defined Type (UDT), which encapsulates all data, settings,
and statistical metrics for a single profile, enabling stateful
analysis with on-demand calculations.
Key Features:
1. **Object-Oriented Design (UDT):** The library is built around
the `VProf` UDT. This object encapsulates all profile data
and provides methods for its full lifecycle management,
including creation, cloning, clearing, and merging of profiles.
2. **Volume Allocation (`AllotMode`):** Offers two methods for
allocating a bar's volume:
- **Classic:** Assigns the entire bar's volume to the close
price bucket.
- **PDF:** Distributes volume across the bar's range using a
statistical price distribution model from the `LibBrSt` library.
3. **Buy/Sell Volume Splitting (`SplitMode`):** Provides methods
for classifying volume into buying and selling pressure:
- **Classic:** Classifies volume based on the bar's color (Close vs. Open).
- **Dynamic:** A specific model that analyzes candle structure
(body vs. wicks) and a short-term trend factor to
estimate the buy/sell share at each price level.
4. **Statistical Analysis (On-Demand):** Offers a suite of
statistical metrics calculated using a "Lazy Evaluation"
pattern (computed only when requested via `get...` methods):
- **Central Tendency:** Point of Control (POC), VWAP, and Median.
- **Dispersion:** Value Area (VA) and Population Standard Deviation.
- **Shape:** Skewness and Excess Kurtosis.
- **Delta:** Cumulative Volume Delta, including its
historical high/low watermarks.
5. **Structural Analysis:** Includes a parameter-free method
(`getSegments`) to decompose a profile into its fundamental
unimodal segments, allowing for modality detection (e.g.,
identifying bimodal profiles).
6. **Dynamic Profile Management:**
- **Auto-Fitting:** Profiles set to `dynamic = true` will
automatically expand their price range to fit new data.
- **Manipulation:** The resolution, price range, and Value Area
of a dynamic profile can be changed at any time. This
triggers a resampling process that uses a **linear
interpolation model** to re-bucket existing volume.
- **Assumption:** Non-dynamic profiles are fixed and will throw
a `runtime.error` if `addBar` is called with data
outside their initial range.
7. **Bucket-Level Access:** Provides getter methods for direct
iteration and analysis of the raw buy/sell volume and price
boundaries of each individual price bucket.
---
**DISCLAIMER**
This library is provided "AS IS" and for informational and
educational purposes only. It does not constitute financial,
investment, or trading advice.
The author assumes no liability for any errors, inaccuracies,
or omissions in the code. Using this library to build
trading indicators or strategies is entirely at your own risk.
As a developer using this library, you are solely responsible
for the rigorous testing, validation, and performance of any
scripts you create based on these functions. The author shall
not be held liable for any financial losses incurred directly
or indirectly from the use of this library or any scripts
derived from it.
create(buckets, rangeUp, rangeLo, dynamic, valueArea, allot, estimator, cdfSteps, split, trendLen)
Construct a new `VProf` object with fixed bucket count & range.
Parameters:
buckets (int) : series int number of price buckets ≥ 1
rangeUp (float) : series float upper price bound (absolute)
rangeLo (float) : series float lower price bound (absolute)
dynamic (bool) : series bool Flag for dynamic adaption of profile ranges
valueArea (int) : series int Percentage of total volume to include in the Value Area (1..100)
allot (series AllotMode) : series AllotMode Allocation mode `classic` or `pdf` (default `classic`)
estimator (series PriceEst enum from AustrianTradingMachine/LibBrSt/1) : series LibBrSt.PriceEst PDF model when `model == PDF`. (deflault = 'uniform')
cdfSteps (int) : series int even #sub-intervals for Simpson rule (default 20)
split (series SplitMode) : series SplitMode Buy/Sell determination (default `classic`)
trendLen (int) : series int Look‑back bars for trend factor (default 3)
Returns: VProf freshly initialised profile
method clone(self)
Create a deep copy of the volume profile.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object to copy
Returns: VProf A new, independent copy of the profile
method clear(self)
Reset all bucket tallies while keeping configuration intact.
Namespace types: VProf
Parameters:
self (VProf) : VProf profile object
Returns: VProf cleared profile (chaining)
method merge(self, srcABuy, srcASell, srcRangeUp, srcRangeLo, srcCvd, srcCvdHi, srcCvdLo)
Merges volume data from a source profile into the current profile.
If resizing is needed, it performs a high-fidelity re-bucketing of existing
volume using a linear interpolation model inferred from neighboring buckets,
preventing aliasing artifacts and ensuring accurate volume preservation.
Namespace types: VProf
Parameters:
self (VProf) : VProf The target profile object to merge into.
srcABuy (array) : array The source profile's buy volume bucket array.
srcASell (array) : array The source profile's sell volume bucket array.
srcRangeUp (float) : series float The upper price bound of the source profile.
srcRangeLo (float) : series float The lower price bound of the source profile.
srcCvd (float) : series float The final Cumulative Volume Delta (CVD) value of the source profile.
srcCvdHi (float) : series float The historical high-water mark of the CVD from the source profile.
srcCvdLo (float) : series float The historical low-water mark of the CVD from the source profile.
Returns: VProf `self` (chaining), now containing the merged data.
method addBar(self, offset)
Add current bar’s volume to the profile (call once per realtime bar).
classic mode: allocates all volume to the close bucket and classifies
by `close >= open`. PDF mode: distributes volume across buckets by the
estimator’s CDF mass. For `split = dynamic`, the buy/sell share per
price is computed via context-driven piecewise s(u).
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
offset (int) : series int To offset the calculated bar
Returns: VProf `self` (method chaining)
method setBuckets(self, buckets)
Sets the number of buckets for the volume profile.
Behavior depends on the `isDynamic` flag.
- If `dynamic = true`: Works on filled profiles by re-bucketing to a new resolution.
- If `dynamic = false`: Only works on empty profiles to prevent accidental changes.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
buckets (int) : series int The new number of buckets
Returns: VProf `self` (chaining)
method setRanges(self, rangeUp, rangeLo)
Sets the price range for the volume profile.
Behavior depends on the `dynamic` flag.
- If `dynamic = true`: Works on filled profiles by re-bucketing existing volume.
- If `dynamic = false`: Only works on empty profiles to prevent accidental changes.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
rangeUp (float) : series float The new upper price bound
rangeLo (float) : series float The new lower price bound
Returns: VProf `self` (chaining)
method setValueArea(self, valueArea)
Set the percentage of volume for the Value Area. If the value
changes, the profile is finalized again.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
valueArea (int) : series int The new Value Area percentage (0..100)
Returns: VProf `self` (chaining)
method getBktBuyVol(self, idx)
Get Buy volume of a bucket.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
idx (int) : series int Bucket index
Returns: series float Buy volume ≥ 0
method getBktSellVol(self, idx)
Get Sell volume of a bucket.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
idx (int) : series int Bucket index
Returns: series float Sell volume ≥ 0
method getBktBnds(self, idx)
Get Bounds of a bucket.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
idx (int) : series int Bucket index
Returns:
up series float The upper price bound of the bucket.
lo series float The lower price bound of the bucket.
method getPoc(self)
Get POC information.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
Returns:
pocIndex series int The index of the Point of Control (POC) bucket.
pocPrice. series float The mid-price of the Point of Control (POC) bucket.
method getVA(self)
Get Value Area (VA) information.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object
Returns:
vaUpIndex series int The index of the upper bound bucket of the Value Area.
vaUpPrice series float The upper price bound of the Value Area.
vaLoIndex series int The index of the lower bound bucket of the Value Area.
vaLoPrice series float The lower price bound of the Value Area.
method getMedian(self)
Get the profile's median price and its bucket index. Calculates the value on-demand if stale.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object.
Returns:
medianIndex series int The index of the bucket containing the Median.
medianPrice series float The Median price of the profile.
method getVwap(self)
Get the profile's VWAP and its bucket index. Calculates the value on-demand if stale.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object.
Returns:
vwapIndex series int The index of the bucket containing the VWAP.
vwapPrice series float The Volume Weighted Average Price of the profile.
method getStdDev(self)
Get the profile's volume-weighted standard deviation. Calculates the value on-demand if stale.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object.
Returns: series float The Standard deviation of the profile.
method getSkewness(self)
Get the profile's skewness. Calculates the value on-demand if stale.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object.
Returns: series float The Skewness of the profile.
method getKurtosis(self)
Get the profile's excess kurtosis. Calculates the value on-demand if stale.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object.
Returns: series float The Kurtosis of the profile.
method getSegments(self)
Get the profile's fundamental unimodal segments. Calculates on-demand if stale.
Uses a parameter-free, pivot-based recursive algorithm.
Namespace types: VProf
Parameters:
self (VProf) : VProf The profile object.
Returns: matrix A 2-column matrix where each row is an pair.
method getCvd(self)
Cumulative Volume Delta (CVD) like metric over all buckets.
Namespace types: VProf
Parameters:
self (VProf) : VProf Profile object.
Returns:
cvd series float The final Cumulative Volume Delta (Total Buy Vol - Total Sell Vol).
cvdHi series float The running high-water mark of the CVD as volume was added.
cvdLo series float The running low-water mark of the CVD as volume was added.
VProf
VProf Bucketed Buy/Sell volume profile plus meta information.
Fields:
buckets (series int) : int Number of price buckets (granularity ≥1)
rangeUp (series float) : float Upper price range (absolute)
rangeLo (series float) : float Lower price range (absolute)
dynamic (series bool) : bool Flag for dynamic adaption of profile ranges
valueArea (series int) : int Percentage of total volume to include in the Value Area (1..100)
allot (series AllotMode) : AllotMode Allocation mode `classic` or `pdf`
estimator (series PriceEst enum from AustrianTradingMachine/LibBrSt/1) : LibBrSt.PriceEst Price density model when `model == PDF`
cdfSteps (series int) : int Simpson integration resolution (even ≥2)
split (series SplitMode) : SplitMode Buy/Sell split strategy per bar
trendLen (series int) : int Look‑back length for trend factor (≥1)
maxBkt (series int) : int User-defined number of buckets (unclamped)
aBuy (array) : array Buy volume per bucket
aSell (array) : array Sell volume per bucket
cvd (series float) : float Final Cumulative Volume Delta (Total Buy Vol - Total Sell Vol).
cvdHi (series float) : float Running high-water mark of the CVD as volume was added.
cvdLo (series float) : float Running low-water mark of the CVD as volume was added.
poc (series int) : int Index of max‑volume bucket (POC). Is `na` until calculated.
vaUp (series int) : int Index of upper Value‑Area bound. Is `na` until calculated.
vaLo (series int) : int Index of lower value‑Area bound. Is `na` until calculated.
median (series float) : float Median price of the volume distribution. Is `na` until calculated.
vwap (series float) : float Profile VWAP (Volume Weighted Average Price). Is `na` until calculated.
stdDev (series float) : float Standard Deviation of volume around the VWAP. Is `na` until calculated.
skewness (series float) : float Skewness of the volume distribution. Is `na` until calculated.
kurtosis (series float) : float Excess Kurtosis of the volume distribution. Is `na` until calculated.
segments (matrix) : matrix A 2-column matrix where each row is an pair. Is `na` until calculated.
Waindrops [Makit0]█ OVERALL
Plot waindrops (custom volume profiles) on user defined periods, for each period you get high and low, it slices each period in half to get independent vwap, volume profile and the volume traded per price at each half.
It works on intraday charts only, up to 720m (12H). It can plot balanced or unbalanced waindrops, and volume profiles up to 24H sessions.
As example you can setup unbalanced periods to get independent volume profiles for the overnight and cash sessions on the futures market, or 24H periods to get the full session volume profile of EURUSD
The purpose of this indicator is twofold:
1 — from a Chartist point of view, to have an indicator which displays the volume in a more readable way
2 — from a Pine Coder point of view, to have an example of use for two very powerful tools on Pine Script:
• the recently updated drawing limit to 500 (from 50)
• the recently ability to use drawings arrays (lines and labels)
If you are new to Pine Script and you are learning how to code, I hope you read all the code and comments on this indicator, all is designed for you,
the variables and functions names, the sometimes too big explanations, the overall structure of the code, all is intended as an example on how to code
in Pine Script a specific indicator from a very good specification in form of white paper
If you wanna learn Pine Script form scratch just start HERE
In case you have any kind of problem with Pine Script please use some of the awesome resources at our disposal: USRMAN , REFMAN , AWESOMENESS , MAGIC
█ FEATURES
Waindrops are a different way of seeing the volume and price plotted in a chart, its a volume profile indicator where you can see the volume of each price level
plotted as a vertical histogram for each half of a custom period. By default the period is 60 so it plots an independent volume profile each 30m
You can think of each waindrop as an user defined candlestick or bar with four key values:
• high of the period
• low of the period
• left vwap (volume weighted average price of the first half period)
• right vwap (volume weighted average price of the second half period)
The waindrop can have 3 different colors (configurable by the user):
• GREEN: when the right vwap is higher than the left vwap (bullish sentiment )
• RED: when the right vwap is lower than the left vwap (bearish sentiment )
• BLUE: when the right vwap is equal than the left vwap ( neutral sentiment )
KEY FEATURES
• Help menu
• Custom periods
• Central bars
• Left/Right VWAPs
• Custom central bars and vwaps: color and pixels
• Highly configurable volume histogram: execution window, ticks, pixels, color, update frequency and fine tuning the neutral meaning
• Volume labels with custom size and color
• Tracking price dot to be able to see the current price when you hide your default candlesticks or bars
█ SETTINGS
Click here or set any impar period to see the HELP INFO : show the HELP INFO, if it is activated the indicator will not plot
PERIOD SIZE (max 2880 min) : waindrop size in minutes, default 60, max 2880 to allow the first half of a 48H period as a full session volume profile
BARS : show the central and vwap bars, default true
Central bars : show the central bars, default true
VWAP bars : show the left and right vwap bars, default true
Bars pixels : width of the bars in pixels, default 2
Bars color mode : bars color behavior
• BARS : gets the color from the 'Bars color' option on the settings panel
• HISTOGRAM : gets the color from the Bearish/Bullish/Neutral Histogram color options from the settings panel
Bars color : color for the central and vwap bars, default white
HISTOGRAM show the volume histogram, default true
Execution window (x24H) : last 24H periods where the volume funcionality will be plotted, default 5
Ticks per bar (max 50) : width in ticks of each histogram bar, default 2
Updates per period : number of times the histogram will update
• ONE : update at the last bar of the period
• TWO : update at the last bar of each half period
• FOUR : slice the period in 4 quarters and updates at the last bar of each of them
• EACH BAR : updates at the close of each bar
Pixels per bar : width in pixels of each histogram bar, default 4
Neutral Treshold (ticks) : delta in ticks between left and right vwaps to identify a waindrop as neutral, default 0
Bearish Histogram color : histogram color when right vwap is lower than left vwap, default red
Bullish Histogram color : histogram color when right vwap is higher than left vwap, default green
Neutral Histogram color : histogram color when the delta between right and left vwaps is equal or lower than the Neutral treshold, default blue
VOLUME LABELS : show volume labels
Volume labels color : color for the volume labels, default white
Volume Labels size : text size for the volume labels, choose between AUTO, TINY, SMALL, NORMAL or LARGE, default TINY
TRACK PRICE : show a yellow ball tracking the last price, default true
█ LIMITS
This indicator only works on intraday charts (minutes only) up to 12H (720m), the lower chart timeframe you can use is 1m
This indicator needs price, time and volume to work, it will not work on an index (there is no volume), the execution will not be allowed
The histogram (volume profile) can be plotted on 24H sessions as limit but you can plot several 24H sessions
█ ERRORS AND PERFORMANCE
Depending on the choosed settings, the script performance will be highly affected and it will experience errors
Two of the more common errors it can throw are:
• Calculation takes too long to execute
• Loop takes too long
The indicator performance is highly related to the underlying volatility (tick wise), the script takes each candlestick or bar and for each tick in it stores the price and volume, if the ticker in your chart has thousands and thousands of ticks per bar the indicator will throw an error for sure, it can not calculate in time such amount of ticks.
What all of that means? Simply put, this will throw error on the BITCOIN pair BTCUSD (high volatility with tick size 0.01) because it has too many ticks per bar, but lucky you it will work just fine on the futures contract BTC1! (tick size 5) because it has a lot less ticks per bar
There are some options you can fine tune to boost the script performance, the more demanding option in terms of resources consumption is Updates per period , by default is maxed out so lowering this setting will improve the performance in a high way.
If you wanna know more about how to improve the script performance, read the HELP INFO accessible from the settings panel
█ HOW-TO SETUP
The basic parameters to adjust are Period size , Ticks per bar and Pixels per bar
• Period size is the main setting, defines the waindrop size, to get a better looking histogram set bigger period and smaller chart timeframe
• Ticks per bar is the tricky one, adjust it differently for each underlying (ticker) volatility wise, for some you will need a low value, for others a high one.
To get a more accurate histogram set it as lower as you can (min value is 1)
• Pixels per bar allows you to adjust the width of each histogram bar, with it you can adjust the blank space between them or allow overlaping
You must play with these three parameters until you obtain the desired histogram: smoother, sharper, etc...
These are some of the different kind of charts you can setup thru the settings:
• Balanced Waindrops (default): charts with waindrops where the two halfs are of same size.
This is the default chart, just select a period (30m, 60m, 120m, 240m, pick your poison), adjust the histogram ticks and pixels and watch
• Unbalanced Waindrops: chart with waindrops where the two halfs are of different sizes.
Do you trade futures and want to plot a waindrop with the first half for the overnight session and the second half for the cash session? you got it;
just adjust the period to 1860 for any CME ticker (like ES1! for example) adjust the histogram ticks and pixels and watch
• Full Session Volume Profile: chart with waindrops where only the first half plots.
Do you use Volume profile to analize the market? Lucky you, now you can trick this one to plot it, just try a period of 780 on SPY, 2760 on ES1!, or 2880 on EURUSD
remember to adjust the histogram ticks and pixels for each underlying
• Only Bars: charts with only central and vwap bars plotted, simply deactivate the histogram and volume labels
• Only Histogram: charts with only the histogram plotted (volume profile charts), simply deactivate the bars and volume labels
• Only Volume: charts with only the raw volume numbers plotted, simply deactivate the bars and histogram
If you wanna know more about custom full session periods for different asset classes, read the HELP INFO accessible from the settings panel
EXAMPLES
Full Session Volume Profile on MES 5m chart:
Full Session Unbalanced Waindrop on MNQ 2m chart (left side Overnight session, right side Cash Session):
The following examples will have the exact same charts but on four different tickers representing a futures contract, a forex pair, an etf and a stock.
We are doing this to be able to see the different parameters we need for plotting the same kind of chart on different assets
The chart composition is as follows:
• Left side: Volume Labels chart (period 10)
• Upper Right side: Waindrops (period 60)
• Lower Right side: Full Session Volume Profile
The first example will specify the main parameters, the rest of the charts will have only the differences
MES :
• Left: Period size: 10, Bars: uncheck, Histogram: uncheck, Execution window: 1, Ticks per bar: 2, Updates per period: EACH BAR,
Pixels per bar: 4, Volume labels: check, Track price: check
• Upper Right: Period size: 60, Bars: check, Bars color mode: HISTOGRAM, Histogram: check, Execution window: 2, Ticks per bar: 2,
Updates per period: EACH BAR, Pixels per bar: 4, Volume labels: uncheck, Track price: check
• Lower Right: Period size: 2760, Bars: uncheck, Histogram: check, Execution window: 1, Ticks per bar: 1, Updates per period: EACH BAR,
Pixels per bar: 2, Volume labels: uncheck, Track price: check
EURUSD :
• Upper Right: Ticks per bar: 10
• Lower Right: Period size: 2880, Ticks per bar: 1, Pixels per bar: 1
SPY :
• Left: Ticks per bar: 3
• Upper Right: Ticks per bar: 5, Pixels per bar: 3
• Lower Right: Period size: 780, Ticks per bar: 2, Pixels per bar: 2
AAPL :
• Left: Ticks per bar: 2
• Upper Right: Ticks per bar: 6, Pixels per bar: 3
• Lower Right: Period size: 780, Ticks per bar: 1, Pixels per bar: 2
█ THANKS TO
PineCoders for all they do, all the tools and help they provide and their involvement in making a better community
scarf for the idea of coding a waindrops like indicator, I did not know something like that existed at all
All the Pine Coders, Pine Pros and Pine Wizards, people who share their work and knowledge for the sake of it and helping others, I'm very grateful indeed
I'm learning at each step of the way from you all, thanks for this awesome community;
Opensource and shared knowledge: this is the way! (said with canned voice from inside my helmet :D)
█ NOTE
This description was formatted following THIS guidelines
═════════════════════════════════════════════════════════════════════════
I sincerely hope you enjoy reading and using this work as much as I enjoyed developing it :D
GOOD LUCK AND HAPPY TRADING!
SessionVWAP + ORBThis TradingView Pine Script indicator combines two powerful intraday tools:
Multiple Rolling VWAPs: It plots up to four independent rolling (continuous) Volume Weighted Average Prices (VWAPs) with user-defined periods (e.g., 1-hour, 2-hour, 4-hour, daily). These are "anchored" to a customizable session start time and roll forward accurately without daily resets, providing dynamic fair-value benchmarks that react at different speeds (fastest/shortest on top).
Opening Range Breakout (ORB) Zones: It displays the high/low range (with optional background shading and lines) for major global trading sessions — Sydney, Tokyo, London, New York, and US RTH (Regular Trading Hours, starting at 9:30 ET) — over the first configurable minutes (default 30) after each session open, with history for several prior days.
The latest version adds full timezone flexibility (e.g., Chicago, New York, UTC, London, Tokyo, Sydney), automatically adjusting anchor times and session opens.
Use Case
This script is ideal for intraday and day traders (especially in stocks, futures, forex, or indices) seeking confluence between volume-based value areas and session momentum.
VWAP Component: Use the layered rolling VWAPs as dynamic support/resistance. Price above the fastest VWAPs suggests bullish bias; pullbacks to slower VWAPs offer mean-reversion entries. The multi-timeframe view helps gauge short-term vs. longer-term "fair value."
ORB Component: Trade breakouts from major session opening ranges — e.g., buy above the New York ORB high (red line) for momentum longs, or fade failures for reversals. Combine with VWAP (e.g., only take NY ORB longs if price is above session VWAP) for higher-probability filters.
Overall: Overlay on lower timeframes (1-15 min) to spot setups like ORB breakouts aligning with VWAP crosses, or use for risk management (stops beyond ORB extremes). The timezone support makes it versatile for global markets without manual adjustments.
Intraday Rising & Reversal ScannerPine Script Description: Intraday Rising & Reversal ScannerThis Pine Script is a TradingView indicator designed to identify stocks with intraday (1-hour timeframe) potential for bullish (rising) or bearish (reversal) movements. It scans for stocks based on user-defined technical criteria, including price change, relative volume, RSI, EMA, ATR, and VWAP. The script plots signals on the chart, displays a summary table, and triggers alerts when conditions are met.FeaturesBullish Signal (Rising Stocks):1H Price Change: > 1% (configurable, e.g., >2% for volatile markets).
Relative Volume: > 2.0 (volume is at least twice the 20-period average).
RSI (14): Between 50 and 70 (strong but not overbought momentum).
Price vs EMA 13: Price above the 13-period EMA (confirms short-term uptrend).
ATR (14): Current ATR above its 20-period average (indicates volatility).
VWAP: Price above VWAP (optional, shown on chart for manual confirmation).
Bearish Signal (Reversal Stocks):1H Price Change: < -1% (configurable, e.g., <-2% for stronger reversals).
Relative Volume: > 2.0 (high volume confirms selling pressure).
RSI (14): > 70 (overbought, increasing reversal likelihood).
Price vs EMA 13: Price below the 13-period EMA (confirms short-term downtrend).
ATR (14): Current ATR above its 20-period average (indicates volatility).
VWAP: Price below VWAP (optional, shown on chart for manual confirmation).
Visualization:Bullish Signal: Green triangle below the bar.
Bearish Signal: Red triangle above the bar.
VWAP: Plotted as a blue line for manual verification.
Table: Displays real-time metrics (Change %, Relative Volume, RSI, Price vs EMA, ATR, VWAP) in the top-right corner, color-coded (green for bullish, red for bearish).
Alerts:Separate alerts for bullish ("Intraday Bullish Signal") and bearish ("Intraday Bearish Signal") conditions.
Customizable alert messages include parameter values for easy tracking.
How It WorksThe script runs on the 1-hour (1H) timeframe, ensuring all calculations are based on hourly data.
Indicators are computed:Change %: Percentage price change over the last hour.
Relative Volume: Current volume divided by the 20-period SMA of volume.
RSI: 14-period Relative Strength Index.
EMA 13: 13-period Exponential Moving Average.
ATR: 14-period Average True Range, compared to its 20-period SMA.
VWAP: Volume Weighted Average Price, plotted for visual confirmation.
Signals are generated when all conditions for either bullish or bearish criteria are met.
A table summarizes key metrics, and alerts can be set up for real-time notifications.
Usage InstructionsApply the Script:Open TradingView’s Pine Editor.
Copy and paste the script.
Click "Add to Chart" and set the chart to the 1-hour (1H) timeframe.
Set Up Alerts:Right-click on the chart > "Add Alert".
Select "Intraday Bullish Signal" or "Intraday Bearish Signal" as the condition.
Configure notifications (e.g., SMS, email, or TradingView alerts).
Manual VWAP Check:VWAP is plotted as a blue line. Verify that the price is above VWAP for bullish signals or below for bearish signals using the table or chart.
To make VWAP a mandatory filter, uncomment the VWAP conditions in the bull_signal and bear_signal definitions.
USD Session 8FX - LDN & NY (TF-invariant, Live + Table)What it is
A USD strength/weakness meter for the London (08:00–08:45) or New York (15:30–16:00/16:15) session. It blends the movement of 8 markets—EURUSD, GBPUSD, AUDUSD, NZDUSD, USDCHF, USDCAD, USDJPY, XAUUSD—into one Score that is timeframe-invariant (it uses a 1-minute “boundary TF” under the hood so changing chart TF doesn’t change the math).
Core logic (simple)
During the chosen session window, it records each symbol’s start and live end prices, computes returns, optionally normalizes by ATR (volatility), applies your weights, and averages anti-USD (EUR/GBP/AUD/NZD/XAU) vs USD-base (CHF/CAD/JPY) groups.
The final Score is the normalized sum of weighted contributions:
Score > 0 → “USD Strong”
Score < 0 → “USD Weak”
At the session close it freezes (“Locked”) the results so you can review them later.
What you see
Main plot: the USD Score line (with a 0 baseline).
Optional lines: Anti-USD average vs USD-base average (post-normalization, pre-weights).
Session background shading (London silver, New York aqua).
Live table with:
Each symbol’s % change, its weight, and its contribution to the Score.
TOP badges for the two biggest drivers (by absolute contribution).
A Side column (only for the two TOPs) showing BUY/SELL aligned with the USD verdict (e.g., if USD Strong → SELL anti-USD pairs like EURUSD, BUY USD-base like USDCHF).
Verdict row with USD Strong/Weak, the Score value, the window text, and whether you’re LIVE / CLOSED / FROZEN.
Trade Gate panel:
Shows Verdict (USD Strong/Weak), Bias OK/weak (|Score| vs your threshold), Top-1/Top-2 VWAP checks, an overall GATE: OK/NO, and an Entry hint string (e.g., “SELL EURUSD, BUY USDCHF”) when conditions align.
VWAP “Trade Gate”
It confirms alignment between the USD bias and price vs VWAP for the top movers:
If USD Strong: anti-USD symbols should be below VWAP (short bias), USD-base symbols above VWAP (long bias).
If USD Weak: the opposite.
Gate = OK only if |Score| ≥ minAbsScore and at least one of the two TOP symbols is on the correct side of VWAP.
Tip: set vwapTF to an intraday value (“1”, “5”, “15”) for reliable VWAP on higher-TF charts.
Alerts
At session close: “USD Strong/Weak – session close”.
Live threshold: alerts when |Score| crosses your intraday threshold up/down.
Entry hint (Gate OK): triggers when the Gate flips from NO → OK inside the window.
If you create an alert of type “Any alert() function call”, you also get a dynamic message like:
ENTRY HINT • Hint: SELL EURUSD, BUY USDCHF
Key inputs you can tweak
Session: London vs New York; NY end time 16:00 or 16:15.
Timezone: default Europe/Tirane.
Boundary TF: default “1” (keeps the indicator TF-invariant).
minAbsScore: sensitivity threshold for “Bias OK”.
ATR normalization (len): stabilizes comparisons across different volatility regimes.
VWAP settings: toggle panel and set vwapTF.
How to use (playbook)
Choose the session (e.g., New York 15:30–16:15), keep Boundary TF = 1.
If you’re on a higher-TF chart, set vwapTF = "1" or "5".
Watch Score and Verdict; when |Score| ≥ minAbsScore, bias is meaningful.
Check Top-1/Top-2 and the Trade Gate:
If Gate = OK, use the Entry hint (e.g., “SELL EURUSD, BUY USDCHF”) as the aligned idea.
Use your own execution rules (e.g., structure, risk, stops) on the suggested symbols.
After close, review the Frozen table to validate behavior and refine thresholds/weights.
Notes & edge cases
If some markets are illiquid/holiday, a few returns may be na; the script handles that gracefully.
If ta.vwap is na on high TFs, the Gate will simply not confirm—set vwapTF intraday.
You can customize weights (e.g., reduce XAUUSD to -0.3 or similar) to suit your basket philosophy.
If you want, I can add toggles to show Side for all 8 symbols, or print a one-line summary (e.g., “USD Strong • Score 0.23 • Gate OK • SELL EURUSD, BUY USDCHF”) in the top-left of the pane.
imbalances bandsThis indicator is designed to identify imbalances based on the calculation of the average of the highest and lowest prices. It forms a kind of band indicating correction points.
This indicator uses a total of 4 modified VWAPs, separated into 2 options that the user can activate or deactivate by checking or unchecking the options "Show imbalances bands VWAP 1" or "Show imbalances bands VWAP 2".
Let's talk about the first option, "Show imbalances bands VWAP 1". This displays 2 modified VWAPs on the screen, one in green and one in red, forming a kind of band that indicates possible points of imbalance in the market, signaling increased volatility between buying and selling. When the price tests the bands, it can be useful as there is a probability of a correction in the movement.
This can be particularly useful for those who trade using a scalping style, as it helps analyze when the price tests the bands. It can also be beneficial for trend traders because when the price tests one of the bands, there is a probability of a movement correction.
Now let's talk about the option "Show imbalances bands VWAP 2". It contains two modified VWAPs, one in purple and one in blue, which also form a kind of band. These bands also indicate the probability of a movement correction.
What is the difference between the Show imbalances bands VWAP 1 option and the Show imbalances bands VWAP 2 option?
The option "Show imbalances bands VWAP 2" consists of 2 modified volume-weighted moving averages that have a calculation checking the increase in volatility between the highest and lowest prices. One modified moving average is in purple, and the other modified moving average is in blue, forming a kind of two modified VWAPs.
The option "Show Imbalance Bands VWAP 1" consists of two modified moving averages using the absolute difference between the closing price and the moving average instead of the volume. This is particularly useful for assets where the volume is not a good indicator or is not available.
The option "Show Imbalance Bands VWAP 1" also has a calculation that checks for increased volatility between the highest and lowest prices. It features two modified moving averages, one in green and one in red.
This indicator can be adjusted according to the preferences and characteristics of the specific asset or market. It provides clear visual information and can be used as a complementary tool for technical analysis in trading strategies.
and Interesting period 5,20,50,80,200
Interesting imbalance setting 2.4, 3.3 ,4.2
Analysis Ideas: If you are following a trend, you can use this indicator to analyze how the price behaves around the bands. Since the imbalance bands indicate a probability of correction, it can be useful for identifying protection points or moments to be cautious, as there might be a probability of increased volatility.
Analysis Ideas2:For those trading using a scalping style, observe how the price behaves when it tests the imbalance band, as there may be a probability of increased volatility.
Please note that this indicator is designed for educational and informational purposes. Always conduct your own analysis and consider risk management strategies before making trading decisions.
Elite Trend FusionThis indicator combines multiple technical analysis tools to assist traders in identifying trends, support/resistance levels, and potential trading opportunities. Developed by @IQ-TRADER with contributions to the Alpha Section by @KivancOzbilgic, this script overlays the following components on your chart:
EMA1: A customizable Exponential Moving Average for short-term trend analysis.
SMA Cluster (50, 100, 200): Simple Moving Averages on daily timeframes to identify long-term trends and key support/resistance zones.
Anchored VWAP x2 (VWAPCVD & VWAPARZ): Two Volume Weighted Average Price lines anchored to user-defined dates, providing insights into price levels relative to volume from specific points in time.
AlphaTrend: A custom trend-following indicator based on ATR and MFI, helping to gauge market direction and volatility.
Usage InstructionsInstallation:
Copy and paste the script into the Pine Script editor on TradingView, then add it to your chart.
Customization:Adjust the periods for EMA, SMA50, SMA100, and SMA200 under the "Inputs" tab.
Set the anchor dates for VWAPCVD and VWAPARZ to analyze specific historical periods.
Enable or disable individual components (EMA1, SMA50, SMA100, SMA200, VWAPCVD, VWAPARZ, AlphaTrend) and toggle labels via the settings.
Customize colors and line thickness to suit your preferences.
Modify the AlphaTrend multiplier and period for tailored sensitivity.
Interpretation:
Use the EMA1 for short-term momentum and crossovers with SMAs.
Monitor SMA crossovers (e.g., SMA50 crossing SMA200) for trend changes.
The Anchored VWAPs act as dynamic support/resistance levels based on the selected anchor dates.
AlphaTrend provides a visual guide for trend direction; use it alongside other indicators for confirmation.
Labels on the last bar show the current value and percentage distance from the price for each enabled indicator.
Pine Screener Module Usage:
Add this indicator to the Pine Screener to filter stocks, forex pairs, or other instruments based on the calculated distances (in percentage) between the close price and SMA50, SMA100, SMA200, VWAPCVD, and VWAPARZ.
In the Screener, use the "SMA50 Distance (%)", "SMA100 Distance (%)", "SMA200 Distance (%)", "VWAPCVD Distance (%)", and "VWAPARZ Distance (%)" columns to identify overbought/oversold conditions or potential reversal points.
Example filters: Set conditions like "SMA50 Distance (%) > 5" to find stocks trading significantly above the 50-day SMA, or "VWAPCVD Distance (%) < -2" to spot assets below the anchored VWAP, indicating potential support levels.
Combine multiple conditions (e.g., SMA50 Distance (%) > 5 AND AlphaTrend > previous AlphaTrend) to refine your scan for bullish trends.
Note: Ensure the indicator is applied to the chart or screener with the desired timeframe for accurate results.
Notes
This is an overlay indicator, meaning it plots directly on the price chart.
The script uses daily SMA calculations for consistency across timeframes.
Labels appear only on the last bar and are customizable.
This tool is for educational and informational purposes only. Trading involves risks, and it is recommended to consult a financial advisor before making decisions.
The script is credited to @IQ-TRADER with acknowledgment to @KivancOzbilgic for the Alpha Section contribution, adhering to intellectual property guidelines.
No Financial Advice: The description explicitly states that the indicator is for educational use and not financial advice, complying with TradingView's policy against promoting trading signals as guarantees.
Clear Usage: Step-by-step instructions are provided to ensure users can apply the indicator effectively, including screener usage.
No External Links or Promotions: No external links or promotional content is included, aligning with platform rules.






















