OPEN-SOURCE SCRIPT
تم تحديثه ORB + Fair Value Gaps (FVG/iFVG) Suite with Daily 50% Midline

A complete smart-money–focused price-action toolkit combining the New York Open Range Breakout (ORB), ICT-style Fair Value Gaps, Inverted FVGs, and a dynamic Daily 50% Midline.
Designed for traders who want a clean, fast, and highly visual way to track liquidity, imbalances, and intraday directional bias.
📌 Key Features
1. NY Session ORB (09:30–09:45 New York Time)
Automatically plots:
ORB High
ORB Low
Labels for ORB high/low
Optional 5-minute chart restriction
Lines extend forward for easy reference
Used to identify breakout conditions, liquidity sweeps, and directional bias into the morning session.
📌 2. ICT-Style Fair Value Gaps (FVGs)
Full automated detection of bullish & bearish FVGs based on the classic 3-candle displacement structure:
Bullish FVG: high[2] < low
Bearish FVG: low[2] > high
Each FVG is drawn as a box with:
Custom colour
Custom border style (solid, dashed, dotted)
Automatic extension to the right until filled
Optional size text showing the gap in points (font size/colour adjustable)
Adjustable max lookback for performance
📌 3. Inverted FVGs (iFVGs)
Once price fully fills an FVG, it automatically becomes an iFVG, shown with:
Custom iFVG colour
Custom border style
Extension to the right
Once price trades through the zone from the opposite side, the iFVG is considered “consumed” and:
It stops extending
And optionally auto-deletes based on user settings
This makes it easy to track meaningful imbalances that turn into liquidity pockets.
📌 4. “Show Only After ORB” Filter
Optionally hide all FVGs/iFVGs formed before the ORB completes.
This is especially useful for intraday strategies focused on NY session structure only.
📌 5. Daily 50% Midline (OHLC Midpoint)
A dynamic, always-updating midpoint of the current daily candle:
Mid = (Daily High + Daily Low) / 2
Features:
Custom colour
Dashed styling
Extends left and right as a horizontal ray
Updates live as the daily candle forms
Great for bias filters, mean reversion, and daily liquidity zones.
📌 6. Performance-Optimized (Fast!)
Built with:
Fully configurable max lookback
Memory-efficient arrays
Auto-cleaning of old FVG/iFVG objects
Lightweight daily midline recalculation
This allows extremely fast rendering even on 1-minute charts.
📌 7. Alerts
Includes a clean alert condition:
Price returned to a Fair Value Gap
Works for both bullish and bearish FVG revisits.
🎯 Who This Indicator Is For
This tool is ideal for traders who use:
ICT / SMC concepts
Liquidity-based trading
ORB strategies
Imbalance-driven price action
Intraday or NY session-focused setups
Futures, crypto, forex, and equities
🎁 Summary
This indicator gives you:
A clean ORB framework
Automatic, dynamic FVG and iFVG analysis
Real-time daily candle context
Customizable visuals
Powerful session filtering
Efficient performance
All in one clean, intuitive package built for real-time decision making.
Designed for traders who want a clean, fast, and highly visual way to track liquidity, imbalances, and intraday directional bias.
📌 Key Features
1. NY Session ORB (09:30–09:45 New York Time)
Automatically plots:
ORB High
ORB Low
Labels for ORB high/low
Optional 5-minute chart restriction
Lines extend forward for easy reference
Used to identify breakout conditions, liquidity sweeps, and directional bias into the morning session.
📌 2. ICT-Style Fair Value Gaps (FVGs)
Full automated detection of bullish & bearish FVGs based on the classic 3-candle displacement structure:
Bullish FVG: high[2] < low
Bearish FVG: low[2] > high
Each FVG is drawn as a box with:
Custom colour
Custom border style (solid, dashed, dotted)
Automatic extension to the right until filled
Optional size text showing the gap in points (font size/colour adjustable)
Adjustable max lookback for performance
📌 3. Inverted FVGs (iFVGs)
Once price fully fills an FVG, it automatically becomes an iFVG, shown with:
Custom iFVG colour
Custom border style
Extension to the right
Once price trades through the zone from the opposite side, the iFVG is considered “consumed” and:
It stops extending
And optionally auto-deletes based on user settings
This makes it easy to track meaningful imbalances that turn into liquidity pockets.
📌 4. “Show Only After ORB” Filter
Optionally hide all FVGs/iFVGs formed before the ORB completes.
This is especially useful for intraday strategies focused on NY session structure only.
📌 5. Daily 50% Midline (OHLC Midpoint)
A dynamic, always-updating midpoint of the current daily candle:
Mid = (Daily High + Daily Low) / 2
Features:
Custom colour
Dashed styling
Extends left and right as a horizontal ray
Updates live as the daily candle forms
Great for bias filters, mean reversion, and daily liquidity zones.
📌 6. Performance-Optimized (Fast!)
Built with:
Fully configurable max lookback
Memory-efficient arrays
Auto-cleaning of old FVG/iFVG objects
Lightweight daily midline recalculation
This allows extremely fast rendering even on 1-minute charts.
📌 7. Alerts
Includes a clean alert condition:
Price returned to a Fair Value Gap
Works for both bullish and bearish FVG revisits.
🎯 Who This Indicator Is For
This tool is ideal for traders who use:
ICT / SMC concepts
Liquidity-based trading
ORB strategies
Imbalance-driven price action
Intraday or NY session-focused setups
Futures, crypto, forex, and equities
🎁 Summary
This indicator gives you:
A clean ORB framework
Automatic, dynamic FVG and iFVG analysis
Real-time daily candle context
Customizable visuals
Powerful session filtering
Efficient performance
All in one clean, intuitive package built for real-time decision making.
ملاحظات الأخبار
✅ Updated Description (TradingView-Compliant)Overview
This indicator combines several ICT-style concepts into a single cohesive tool designed for intraday traders who rely on displacement, liquidity behaviour, and session-based context.
While ORB tools, FVG indicators, and daily midlines exist independently, no existing script brings all of these elements together into a unified framework that interacts meaningfully with price action in real time.
The goal of this script is to remove the clutter and redundancy of using multiple separate indicators and instead provide one streamlined, efficient visual system for structure, imbalance, and session context.
📌 1. NY Session ORB (09:30–09:45 New York Time)
The script automatically computes and displays the Opening Range Breakout (ORB) high and low for the NY session, including:
ORB High & Low
Auto-extending ORB lines
Labels for both levels
Optional 5-minute time-frame restriction
The ORB provides the structural “opening range” that anchors the rest of the indicator. Many traders use this window to identify directional bias, potential liquidity sweeps, or opening displacement.
Subsequent FVG logic can also optionally filter out any imbalances formed before this ORB completes.
📌 2. ICT-Style Fair Value Gaps (FVGs)
The script automatically detects classic 3-candle displacements:
Bullish FVG: high[2] < low
Bearish FVG: low[2] > high
Each FVG is drawn as a dynamic zone that:
Extends to the right until filled
Uses user-defined colours, border styles, and opacity
Includes optional gap-size labels (points)
Adapts its display based on ORB completion
These zones help visualize inefficiencies and potential points of return or continuation.
📌 3. Inverted FVGs (iFVGs)
Once price fully closes through an FVG, the zone transitions into an inverted FVG, marking a shift in liquidity behaviour.
The script highlights iFVGs with:
A distinct colour
Custom border styles
Continued extension until fully consumed
Automatic deletion when desired
This provides an objective, automated way to track important imbalances that flip into responsive liquidity pockets.
📌 4. Daily 50% Midline + Price Label
The indicator calculates the dynamic midpoint of the current daily candle:
Midpoint = (Daily High + Daily Low) / 2
Features include:
A dashed horizontal ray
Customizable colour
Automatic real-time updating
A clean price label anchored to the most recent bar
This level acts as a daily mean-reversion marker, a bias filter, and a liquidity magnet often respected during NY session trading.
📌 5. “Show Only After ORB” Filtering
For traders who want ORB-centric setups, the script can automatically hide all FVGs and iFVGs that were created before the NY opening range completes.
This keeps the chart focused on intraday structure that aligns with session-specific displacement.
📌 6. Efficient Performance
Despite combining several concepts, the script remains fast and lightweight due to:
Array-based object tracking
Automatic cleanup of old zones
Adjustable lookback window
Minimal repeated calculations
This allows smooth use even on 1-minute charts with dense imbalance structure.
📌 7. Alerts
Included alert condition:
Price returned to a Fair Value Gap
This triggers on either bullish or bearish FVG revisits and supports real-time trade execution alerts.
🎯 Why This Script Exists
This indicator is not a random mashup of unrelated tools.
It was designed because traders using FVGs, iFVGs, ORB structure, and the daily 50% line often need all of these tools visible at once—and no existing indicator combines them into a single, high-performance framework.
By bringing these components together:
The ORB establishes opening structure
FVGs show initial imbalance and displacement
iFVGs reveal when inefficiencies reverse
The daily midline provides higher-time-frame context
All are displayed in one clean, coordinated visual system
This eliminates the need for 3–5 separate indicators and provides a unified and intuitive read of intraday liquidity behaviour.
🎁 Summary
This tool delivers:
A structured NY ORB framework
Automated FVG and iFVG detection
A dynamic daily midpoint with a live price label
Optional ORB-based filtering
Highly customizable visuals
Clean performance-tuned logic
Real-time alerting
It’s ideal for traders who rely on ICT/SMC concepts, liquidity-based analysis, and intraday NY session strategies—and who want everything they need in one organized indicator.
What's new? Added price label to 50% line.
ملاحظات الأخبار
Big Update!Killzone Boxes
The indicator now automatically shades the four primary ICT killzone sessions directly on your chart — Asia, London, NY AM, and NY PM. Each one is fully customisable with its own time window, colour, and toggle. You can adjust the fill transparency so they sit quietly in the background without getting in the way of your price action. They automatically disappear on higher timeframe charts so your daily or weekly view stays clean.
Killzone Pivot Lines — The Real Deal
The moment a killzone closes, the indicator draws horizontal lines from the exact candle that produced the session high and the session low. Not from the session close bar — from the actual wick that made the level. These lines then extend to the right until price comes back and mitigates them, at which point the line freezes right there and stops drawing. The moment that happens, you get a real-time alert fired with the level name and price in the message. Labels are fully customisable — show or hide the text, show or hide the price, flip them left or right. And here's the important bit — the pivot lines are completely independent of the killzone boxes. Turn the boxes off and your pivot lines stay exactly where they are. These two features are separate and work on their own.
Previous Day and Previous Week Levels
Previous day high, low, and open. Previous week high and low. Current week open. All toggleable independently, all drawn as clean extending horizontal lines with labels — D.H, D.L, D.O, W.H, W.L, W.O. You can also turn on vertical separator lines at the start of each new day or week to visually divide your sessions on intraday charts. Style, width, and colour are all yours to set.
What We Improved
Settings Layout — Actually Usable Now
The settings panel has been completely reorganised into clearly labelled sections: Settings, Killzones, Killzone Pivots, Day–Week, ORB, Daily 50% Midline, Fair Value Gaps, and iFVG. Everything is where you'd expect it to be. Tooltips have been added to the less obvious settings so you're not guessing what something does. The killzone rows now look the way they should — checkbox, name, time window, colour, all on one clean line just like you'd see in a professional indicator.
iFVG Renamed and Clarified
The inverted FVG section is now properly labelled as iFVG throughout with the lowercase i, which is how it should have always been. The size label colour for iFVG zones now has a tooltip that explains exactly what it controls and that it inherits font size from the FVG section above — no more guessing.
FVG Minimum Size Filter
Added a minimum size input so you can filter out the tiny noise gaps that aren't worth trading. Set it to zero and you see everything, or dial it up to only show the gaps that actually matter on your instrument.
Performance and Array Pruning
Under the hood, inactive FVG and pivot entries are cleaned out of memory every 100 bars. On a busy instrument running through a long session this makes a real difference to how the indicator performs.
What Was Already Here
Opening Range Breakout (ORB)
The original foundation of the script. Detects and draws the high and low of the configurable ORB window (default 9:30–9:45 New York time) on 5-minute charts. Lines extend a set number of bars to the right and are labelled ORB h and ORB l. Fully configurable session, line length, and colour.
Daily 50% Midline
A horizontal line drawn at the exact midpoint of the current day's range, updating in real time as the day develops. Style, width, and colour are adjustable. A floating price label sits on the right edge of the line.
Fair Value Gaps (FVGs)
Detects and draws bullish and bearish Fair Value Gaps using the standard three-candle structure. Zones extend to the right as boxes until filled or expired. An optional filter restricts FVGs to only those that form after the ORB is established. Bullish and bearish colours, border style, and width are all configurable. A size label in points floats at the right edge of each zone.
iFVG — Inverted Fair Value Gaps
When price fully closes through an FVG the zone automatically flips to an iFVG, changing colour and border style so you can tell at a glance what's still fresh and what's been inverted. Fully filled iFVGs can optionally be deleted from the chart automatically.
A Couple of Things Worth Knowing
All session and killzone times are calculated in New York time internally, so it doesn't matter what timezone your chart is set to — everything lines up correctly. The timeframe limit setting suppresses session-based drawings above your chosen timeframe so your higher timeframe charts stay uncluttered.
ملاحظات الأخبار
New Update:After request from community member, midline was added to all FVGs and iFVGs. This midline can be added or removed as needed.
ملاحظات الأخبار
Update notes:-Fixed bug where NY Killzone was displaying at the wrong time
-Fixed bug where Asia Killzone doesn't display on Monday
-Fixed bug so no matter what timezone you have your chart set to, all boxes and lines work with their respective killzone sessions
ملاحظات الأخبار
Minor update: Transparencies of FVGs and iFVGs would not change when changing opacity in settings. This has been fixed.ملاحظات الأخبار
Added in ability to limit the amount of Killzone pivots and Killzone boxes to show by days. You can pick each one independently of each other.ملاحظات الأخبار
ORB + FVG + iFVG + 50% Midline — by abearfallsinthewoodsJuly 2025 feels like a long time ago. What started as a focused ORB and FVG tool has grown into something considerably more capable — this update brings more new features in one release than all previous versions combined.
This indicator combines several core concepts from institutional and Smart Money trading into a single, highly configurable tool. It was built for intraday traders who work with killzones, fair value gaps, and opening range breakouts — primarily on futures (ES, NQ, YM) and crypto, though it works on any market.
Everything in this indicator is toggleable. If you only want FVGs, turn everything else off. If you only want killzone pivots, same deal. The settings are organised into clearly labelled groups so you can configure exactly what you need without wading through irrelevant options.
What it does
Opening Range Breakout (ORB)
Marks the high and low of a configurable session window (default 9:30–9:45 ET) and draws horizontal reference lines. Restricted to 5-minute charts by default to keep the signal clean. Includes alerts for candle closes above the ORB high or below the ORB low.
Killzone Session Boxes
Draws coloured boxes over the Asia, London, NY AM, and NY PM killzone sessions. Transparency, colour, and history depth are all adjustable. Box history defaults to 3 days so the chart stays readable on lower timeframes.
Killzone Pivot Levels
At the close of each killzone session, the high and low of that session are marked as pivot lines. Lines extend until they are mitigated by price — when price trades through a level, the line freezes at that bar. Separate history controls for boxes and pivots let you keep structural pivots visible longer than session boxes. Fully labelled and configurable, with alerts on mitigation.
Fair Value Gaps (FVGs) and Inverted FVGs (iFVGs)
Detects and draws bullish and bearish fair value gaps as shaded zones with a 50% midline. When price closes through a gap it converts to an iFVG and changes colour. Includes a minimum size filter (default 3 points — adjust for your instrument), a session filter to control how far back gaps are shown, and an optional partial fill mode that shrinks the gap box as price closes into it, showing only the remaining unfilled portion. The ORB filter can be enabled to show only gaps that form after the opening range completes.
Daily 50% Midline
Draws a live midpoint line between the current day's high and low, anchored to the first candle of the day and extending right. The price label is pinned to the far right of the chart so it is never covered by candles.
Hourly and 4H Pivot Levels
Tracks unmitigated highs and lows from completed 1H and 4H periods. Same freeze-on-mitigation logic as killzone pivots. Separate days-back control, alerts on mitigation, and fully customisable labels and colours. Off by default.
Previous Day and Week High/Low
Optional reference lines for the prior day's and prior week's high, low, and open. Off by default.
Sweep Detection Table
A compact on-chart table showing whether the high and low of each session (Asia, London, NY AM, NY PM) and the previous day and week have been swept by price during the current session. Cells display Y or N with green and red backgrounds so the status is readable at a glance — colour blind friendly by design. Resets each day. Position, colours, and font size are all configurable. Off by default.
Configuration
Nearly every element of this indicator can be customised — colours, transparency, line styles, label text, history depth, timeframe limits, and more. A timeframe limit setting hides session-based elements above your chosen timeframe to keep higher timeframe charts clean. Most features default to a sensible starting point for ES and NQ traders but are straightforward to adjust for other instruments.
Tooltips are included throughout the settings panel to explain what each control does and how it interacts with others.
Alerts available
ORB high breakout (5m candle close)
ORB low breakout (5m candle close)
Killzone pivot mitigated
Hourly / 4H pivot mitigated
Price returned to a fair value gap
Thank you for using this indicator. If it's useful in your trading, that's all the reward there is.
— abearfallsinthewoods
ملاحظات الأخبار
Minor fix to short name and FVG array causing the script to not load in some circumstances.نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.