PD ArraysHi all!
This indicator is based on my indicator 'Order blocks' () that will show you order blocks (OB) found by the indicator or the once that are in alignment with the current trend.
This indicator will, however, not only show you order blocks but it will also find fair value gaps (FVG). Order blocks and fair value gaps are popular and a big part of inner circle trading (ICT). The true power lies in that the indicator will give you alerts and show you labels for retest ('R'), false breakouts ('FB') and breakouts ('B'). This is possible through my library 'Touched' (). The possibilities of interactions in the form of breakouts allows for the findings of broken order blocks and fair value gaps. That means that this indicator allows the showing of zones that are before the CHoCH/CHoCH+ and has flipped function. So a support becomes resistance and vice versa. These zones are popular and are called breaker blocks (BB, a flipped order block) and inversion fair value gap (IFVG, a flipped fair value gap). If a broken order block is before a BOS (instead of a CHoCH/CHoCH+) it's called a mitigation block (MB) instead of a breaker block, but it has the same function.
So, broken order blocks are called breaker blocks (BB) if they're before a change of character (CHoCH/CHoCH+) and mitigation blocks (MB) if they're before a break of structure (BOS).
Broken fair value gaps are called inversion fair value gaps (IFVG). The following zones will be displayed by the indicator:
• Fair value gaps
• Inversion fair value gaps
• Order blocks
• Breaker blocks
• Mitigation blocks
The trend is based on price action that creates change of characters (CHoCH/CHoCH+) and break of structures (BOS). This is based on pivots/swings with your set length for left and right and is possible through my script 'PriceAction' (). The market structure will be displayed with solid lines and a label showing the type (CHoCH/CHoCH+/BOS).
2 things can invalidate a zone and cause it to disappear;
• broken by price or
• a CHoCH/CHoCH+ appears to start a new trend.
I.e. a bullish zone (OB/FVG/BB/MB/IFVG) will disappear upon the closing price being lower than the zone's low or a bearish CHoCH/CHoCH+ happens. A bullish BB/MB/IFVG means a bearish OB/FVG that has been broken by price and is now bullish.
I've tried to make the ability to find zones to be on a different timeframe than chart (like in my script 'Order blocks') but I have not found it to be reliable yet, so the zones are found on the chart's timeframe. I will keep working on making it more reliable, but for now it's only possible to find them on the chart's timeframe.
The default settings will show you all zones (OB/FVG) and their broken version (BB/MB/IFVG). If the trend is bullish it will show bullish OBs and bullish FVGs and bearish OBs/FVGs that are broken and now are bullish (BB/MB/IFVG), and vice versa. OBs and FVGs will be displayed as soon as they are found, IFVGs when it's broken by price and BBs/MBs upon the next structural break (CHoCH/CHoCH+/BOS). All zones within a CHoCH/CHoCH+ (from the high/low pivot that's broken to when it's broken by price) will be kept to be take action on by the script's code. They're hidden until they make sense regarding to the new trend that's determined by the 'PriceAction' library.
Settings
• Keep history
Check this if you want old zones to be kept (from previous trends). They are removed if they are broken or a CHoCH/CHoCH+ appears.
PD ARRAYS
• Fair value gaps
Show fair value gaps or not.
• Inversion fair value gaps
Show inversion fair value gaps or not.
• Order blocks
Show order blocks or not.
• Breaker blocks
Show breaker blocks or not.
• Mitigation blocks
Show mitigation blocks or not.
FAIR VALUE GAPS
• Consecutive rising/falling
The candles in the reaction must consecutivly rise or fall (the 'hl2' must be rising/falling).
• Force strong
If this is enabled it will force the FVG middle candle to have a higher/lower 'hl2' (middle of the entire candle) than the first candle's high.
• Hide consecutive zones
If multiple fair value gaps are found after each other only the first one will be found by the indicator.
• Minimum size
A factor of the Average True Range (of length 14) that the size of the fair value gap must have.
ORDER BLOCKS
• Reaction
A factor of the Average True Range (of length 14) that the total reaction must have. A higher value will create fewer zones with a bigger reaction. And check the checkbox if you want the limit to be displayed.
• Take out
The bar that start the reaction must take out the previous bar high/low (liquidity sweep).
• Consecutive rising/falling
The candles in the reaction must consecutivly rise or fall.
• Fair value gap
The middle bar in the order block must create a fair value gap.
• Hide consecutive zones
If multiple order blocks are found after each other only the first one will be found by the indicator.
DISPLAY
• Bull
The color for bullish zones (OB or FVG). This is the color before a breakout from the price, if it's broken by price once its a bearish zone instead.
• Bear
The color for bearish zones (OB or FVG). This is the color before a breakout from the price, if it's broken by price once its a bullish zone instead.
MARKET STRUCTURE
• Enable
If zones found should follow market structure or not. This is automatically enabled if 'Current trend' is true.
• Pivot
Set the length of pivots and check if they should be shown or not.
• Font size
Set the font size of market structure text.
ALERT
• Retests
Enable alerts for retest.
• False breakouts
Enable alerts for false breakouts.
• Breakouts
Enable alerts for breakouts.
Examples
Below will be some examples of how the indicator behaves. All the examples are with the default settings but only the example zone is visible.
• This demonstrates a retest of an inversion fair value gap after a CHoCH+. After price goes higher (after that support) price retests later IFVGs and goes even higher.
• Shows the lowest bullish fair value gap that's retested two times and goes higher. On the journey of higher prices more FVGs are retested/has false breakouts and price goes higher.
• Shows a bearish order block (at the top) that's retested and price goes lower.
• Shows a bearish breaker block that has two retests and a false breakout. The origin is a bullish order block that's now (after price has broken it) a bearish breaker block. After that resistance price goes lower.
• Shows a retest of a bullish mitigation block (that's a broken bearish order block).
The code for finding these PD Arrays are extracted to my library 'PDArrays' ().
I hope that this indicator will help you in your trading and I've been trying to make an indicator like this for a very long time. Many new tries, a lot of time spent and lots of lines of code I managed to make one that I think is good enough!
If you have any findings of unexpected behavior or feature of, feel free to reach out!
Best of luck trading! Indicateur

PDArraysLibrary "PDArrays"
Hi all!
This library will help you to draw fair value gaps and order blocks and their broken version; breaker blocks, mitigation blocks and inversion fair value gaps.
It does not contain any example code, but I will create an indicator called 'PD Arrays' that uses this library.
Best of luck trading!
Remove(zones, settings)
Removes the zone in 'zones.Remove' and its visuals. The visuals will be kept if 'settings.KeepHistoryZones' is true.
Parameters:
zones (Zones) : The current zone.
settings (Settings) : Set all values in this parameter to define the settings for the zones.
Interactions(zones, settings, trend)
Sets the interactions (retests\false breakouts\breakouts) from the library 'Touched'.
Parameters:
zones (array)
settings (Settings) : set all values in this parameter to define the settings for the order block creation.
trend (int) : the market structure trend that's used for the integrations direction. 1 = bullish, -1 = bearish, 0 = both.
HiddenInteractions(zones, settings, marketStructureInfo, trend)
Sets the hidden interactions (only breakouts) from the library 'Touched'.
Parameters:
zones (Zones)
settings (Settings) : set all values in this parameter to define the settings for the order block creation.
marketStructureInfo (MarketStructureInfo) : The state of market structure needed.
trend (int) : the market structure trend that's used for the integrations direction. 1 = bullish, -1 = bearish, 0 = both.
Pivots(settings)
Creates pivots (high and low) to be used for order block creation.
Parameters:
settings (Settings) : set all values in this parameter to define the settings for the order block creation.
Returns: a tuple containing two pivot values (high and low) or 'na'
OrderBlock(settings, pivotHigh, pivotLow)
Creates an order block if one is found according to the settings parameter.
Parameters:
settings (Settings) : set all values in this parameter to define the settings for the order block creation.
pivotHigh (float) : The high pivot to use.
pivotLow (float) : The low pivot to use.
Returns: a Zone object if an order block is found, na otherwise
FairValueGap(settings)
Creates a fair value gap if one is found according to the settings parameter.
Parameters:
settings (Settings) : set all values in this parameter to define the settings for the fair value gap creation.
Returns: a Zone object if a fair value gap is found, na otherwise
SetBarIndex(zone)
Sets the 'BarIndex' value of the 'zone' object according to 'zone.ChartBaseTime'.
Parameters:
zone (Zone) : The 'Zone' object to set the bar index on.
MarketStructureZones(marketStructureInfo, foundZones, zones, priceAction, settings)
Creates/draws zones (order blocks and fair value gaps) depending on the current market structure from the price action.
Parameters:
marketStructureInfo (MarketStructureInfo) : The infirmation about the market structure from the price action.
foundZones (array) : All zones (order blocks and fair value gaps) to take action on.
zones (Zones) : The 'Zones' object that holds the current context.
priceAction (PriceAction type from mickes/PriceAction/5) : The 'PriceAction.PriceAction' object from the library 'PriceAction'.
settings (Settings) : set all values in this parameter to define the settings for the fair value gap creation.
Visual
Holds the visual elements or the zone.
Fields:
Boxes (array) : All the visual boxes.
Lines (array) : All the visual lines.
Labels (array) : All the visual labels.
Zone
Holds the values for visuals for the zone and to handle interactions (retests, false breakouts and breakouts).
Fields:
BaseTimeClose (series int) : The time close for the start of the zone.
FoundTimeClose (series int) : The time close for the zone when it's found.
ChartBaseTime (series int) : The time for the start of the zone according to the chart bar.
High (series float) : The maximimum price of the zone.
Low (series float) : The minimum price of the zone.
ReactionLimit (series float) : Set a factor (%) of the Average True Range (of length 14) that the total reaction must have.
TouchedZone (Zone type from mickes/Touched/17) : Zone object that will be created and sent to the library 'Touched'.
Visual (Visual) : An object that holds the visual elements for the zone.
SourceTimeframeSeconds (series int) : The 'timeframe.in_seconds' for the zone.
Direction (series int) : Defines if the found zone is bullish (1) or bearish (-1).
LatestRetestBarIndex (series int) : The latest 'bar_index' for a retest.
LatestFalseBreakoutBarIndex (series int) : The latest 'bar_index' for a false breakout.
LatestBreakoutBarIndex (series int) : The latest 'bar_index' for a breakout.
BarIndex (series int) : The chart's timeeframe 'bar_index'.
OriginType (series Type) : The 'Type' for the origin (order block or fair value gap).
Type (series Type) : The type of the zone.
Visible (series bool) : If the zone is drawn and not removed or re-drawn.
Zones
Holds the values for the charts zones.
Fields:
Zones (array) : The currently active zones.
Removes (array) : Reprsents the zones that will be replaced.
HiddenZones (array) : The currently hidden zones.
OrderBlockSettings
The settings specific for order block creation.
Fields:
TakeOut (series bool) : If the bas candle needs to be higher\lower than the previous candle (liquidity sweep\grab).
FairValueGap (series bool) : If there needs o be a fair value gap between the first and the last (third) candle of the order block.
ConsecutiveRisingOrFalling (series bool) : The candles in the reaction must consecutivly rise or fall (the 'hl2' must be rising/falling).
ReactionFactor (series float) : A factor of the Average True Range (of length 14) that the total reaction must have. A higher value will create fewer zones with a bigger reaction. And check the checkbox if you want the limit to be displayed.
ShowReaction (series bool) : Show a solid line for the reaction limit.
HideConsecutiveZones (series bool) : If multiple order blocks are found after each other only the first one will be found by the indicator.
FairValueGapSettings
The settings specific for fair value gap creation.
Fields:
ConsecutiveRisingOrFalling (series bool) : The candles in the reaction must consecutivly rise or fall (the 'hl2' must be rising/falling).
Strong (series bool) : If this is enabled it will force the FVG middle candle to have a higher/lower 'hl2' (middle of the entire candle) than the first candle's high.
HideConsecutiveZones (series bool) : If multiple order blocks are found after each other only the first one will be found by the indicator.
MinimumSizeFactor (series float) : A factor of the Average True Range (of length 14) that the size of the fair value gap must have.
Settings
The settings for the creation of order blocks and fair value gaps. You will need to set all the containing values in here.
Fields:
KeepHistoryZones (series bool) : Set to true if you want removed (from previous trend) zones to be displayed.
Bull (series color) : The color of bullish zones.
Bear (series color) : The color of bearish zones.
CreateCreationZone (series bool) : Set to true if you want a box with a border to be drawn at the creation of the zone. This is usefull when the zones comes from a higher timeframe, but not from a lower. If this is false the 'Draw()' function will start at 'time - time_close'.
AlertRetests (series bool) : Enable if you want alerts to fire when the 'Touched' library signals that a retest of the order block has occured.
AlertFalseBreakouts (series bool) : Enable if you want alerts to fire when the 'Touched' library signals that a false breakout of the order block has occured.
AlertBreakouts (series bool) : Enable if you want alerts to fire when the 'Touched' library signals that a breakout of the order block has occured.
AlertMessageFormat (series string) : Set the format of the fired alert uppon 'Touched' library signals. Need to be in the format of '{0} on order block from ...' where '{0}' is replaced with 'retest', 'false breakout' or 'breakout'.
Types (array) : All types that should be displayed.
FairValueGapSettings (FairValueGapSettings) : The settings for the creation of fair value gaps.
OrderBlockSettings (OrderBlockSettings) : The settings for the creation of order blocks.
MarketStructurePivot
Pivot The 'PriceAction.Pivot' for the market structure.
Fields:
BrokenBarIndex (series int)
Pivot (Pivot type from mickes/PriceAction/5)
MarketStructureInfo
Holds the needed market structure pivots needed for this library.
Fields:
LatestBreakOfStructure (MarketStructurePivot) : The latest break of structure (BOS) found by the 'PriceAction' library.
LatestChangeOfCharacter (MarketStructurePivot) : The latest change of character (CHoCH\CHoCH+) found by the 'PriceAction' library. Bibliothèque

Indicateur

Fair Value GapsFair Value Gaps (FVG) auto-detects bullish (+FVG) and bearish (-FVG) three-candle imbalances on any chart, any timeframe. Tracks each gap's state through its lifecycle and shows a real-time dashboard with active gap counts, nearest gap distance, and exact zone prices.
WHAT IS A FAIR VALUE GAP
An FVG is a three-candle pattern where the middle candle moves so aggressively that it leaves a gap between the wick of the prior candle and the wick of the following candle. Price often returns to fill these gaps before continuing — making them useful as targets, entry zones, or invalidation levels.
A bullish (+FVG) forms when the low of the current candle is above the high of two candles ago, with a bullish middle candle. A bearish (-FVG) is the inverse.
FEATURES
Auto-detects pip size for JPY pairs, other forex, metals, indices, and crypto — no manual configuration needed
Tracks up to 10 active FVGs per side with configurable minimum size filter to ignore noise
Auto-removes filled FVGs OR keeps them on chart greyed out (your choice)
Optional midline marker (50% mitigation level)
Configurable label limit so only your most recent active gaps are annotated — prevents chart clutter
Dashboard shows active count, distance to nearest gap, and exact zone prices
Cells highlight amber when price is currently inside a gap (mid-mitigation)
Movable dashboard position (six options) so it coexists with other indicators
Built-in alerts for new bullish and bearish FVG formations
HOW TO USE
Use FVGs as targets when price has left an unfilled gap behind — markets often return to fill them. Use them as entry zones when price retraces into a gap in the direction of the higher-timeframe trend. Use them as invalidation when price closes through a gap that should have held as support or resistance.
Particularly useful for SMC and ICT traders watching for liquidity sweeps followed by displacement into a fair value gap, then a retracement entry.
Pairs cleanly with the Key Swing Levels (KSL) indicator from the same author — KSL's dashboard defaults to top-right, FVG's to bottom-left, no overlap.
Open-source. Feedback and forks welcome.
Indicateur

FVG Quality Scorer | Flux ChartsGENERAL OVERVIEW:
FVG Quality Scorer is a Fair Value Gap analysis tool designed to extend beyond basic gap detection. Instead of treating every gap equally, this indicator evaluates each FVG across four independent scoring axes and assigns a letter grade (A through D) based on configurable thresholds. This creates a structured view of the chart where gaps are organized by their relative characteristics.
Every FVG is scored once at the moment of creation across Displacement Strength, Volume Delta, Contextual Location, and Structural Alignment. Each axis is scored from 0 to 25, producing a weighted composite score out of 100. Scores are fixed at creation, ensuring the evaluation reflects the conditions present at the time of formation and does not change retroactively. In contrast, each FVG’s lifecycle state (Fresh, Tested, Partially Filled, Mitigated) updates in real time as price interacts with the zone, providing a current view of how price is interacting with each gap.
A companion dashboard tracks grade distribution, active counts, total formations, and average fill times across the visible chart history. Score labels at the edge of each FVG box provide a quick reference to the assigned grade, with optional tooltips displaying the full scoring breakdown and current lifecycle state.
FEATURES:
◇ Four-axis scoring system: Displacement Strength, Volume Delta, Contextual Location, and Structural Alignment, each scored from 0 to 25 for a maximum composite score of 100
◇ Letter grade assignment (A, B, C, D) using per-axis threshold gates with configurable minimum scores and required axes per grade
◇ Lower timeframe volume delta analysis using intrabar data to estimate directional volume distribution within the displacement candle
◇ Higher timeframe FVG nesting detection to identify when current timeframe gaps are positioned within higher timeframe imbalances
◇ Session timing reference covering Asian, London, New York AM, and New York PM sessions based on New York time
◇ Premium and Discount zone scoring using a proportional gradient based on the FVG’s position within a defined price range
◇ Market structure classification using swing high and swing low sequences to label conditions as bullish, bearish, or mixed
◇ Break of Structure (BOS) tracking using crossover logic to identify recent structural breaks relative to the FVG direction
◇ Post-sweep proximity detection identifying FVGs that form after a liquidity sweep of a swing level
◇ Lifecycle state tracking: Fresh → Tested → Partially Filled → Mitigated, with corresponding visual updates on the chart
◇ Score labels with optional tooltips displaying axis scores and current lifecycle state
◇ Dashboard displaying active counts, total formations, and average bars to mitigation per grade, along with nearest A-grade distance tracking
◇ Configurable axis weights for adjusting the influence of each scoring dimension in the composite score
◇ Alerts for newly formed A-grade and B-grade FVGs based on defined grading criteria
WHAT IS A FAIR VALUE GAP?
A Fair Value Gap is a three-candle price formation that highlights an imbalance in price movement. It occurs when the third candle’s wick does not overlap with the first candle’s wick, leaving a visible gap created by the middle candle. This middle candle is often referred to as the “displacement” candle, as it reflects a relatively strong move in price over a short period.
In a bullish FVG, the low of the third candle is positioned above the high of the first candle. In a bearish FVG, the high of the third candle is positioned below the low of the first candle. The space between these two wicks defines the FVG zone.
Within ICT and Smart Money Concepts frameworks, these gaps are interpreted as areas where price moved quickly, leaving limited trading activity at certain levels. As a result, these zones are often monitored as areas of interest if price revisits them in the future. However, not all FVGs share the same characteristics, and variations in formation context are what this indicator evaluates using its scoring system.
WHAT IS THE THEORY BEHIND THIS INDICATOR?
The core premise behind FVG Quality Scorer is that gap detection alone does not capture the full context of how Fair Value Gaps form. On any given trading day, multiple FVGs can appear across timeframes, each with different characteristics depending on the surrounding price action. This indicator evaluates those characteristics using a structured scoring approach.
Not all FVGs form under the same conditions. For example, a gap created by a relatively small candle during low volume periods in a ranging market will differ in structure from one formed during a strong displacement move with increased volume, aligned with broader market structure and session timing. These differences are often considered when analyzing FVGs, but evaluating them manually across multiple factors and timeframes can be time intensive and subjective. FVG Quality Scorer standardizes this process by quantifying these characteristics into a consistent framework.
The indicator’s four-axis model reflects commonly used analytical considerations within ICT and Smart Money Concepts methodologies. These include measuring displacement strength, assessing volume characteristics, evaluating contextual positioning within a range or session, and identifying alignment with market structure. By organizing these factors into a rule-based system, the indicator provides a consistent method for comparing FVG formations based on their underlying attributes.
Axis 1: Displacement Strength (0 to 25 points)
The displacement candle is the middle candle of the three-bar FVG formation and is the candle responsible for creating the gap. This axis evaluates the characteristics of that candle based on its size, structure, and relation to surrounding price action. Candles with larger bodies relative to their total range, higher relative size compared to recent volatility, and alignment with neighboring candles are scored differently than candles with smaller bodies or more pronounced wicks.
The indicator evaluates three sub-metrics within this axis. Body-to-range ratio (0 to 10 points) measures how much of the candle’s total range is composed of the body versus the wicks. A ratio of 0.85 or higher receives 10 points, ratios between 0.70 and 0.85 receive 7 points, ratios between 0.55 and 0.70 receive 4 points, and anything below 0.55 receives zero.
ATR multiple (0 to 10 points) compares the displacement candle’s total range to the 14-period Average True Range. A range equal to or greater than 2 times the ATR receives 10 points, 1.5x to 2x receives 7 points, 1x to 1.5x receives 4 points, and values below 1x receive zero.
Consecutive displacement (0 to 5 points) evaluates whether the candles immediately before and after the displacement candle close in the same direction as the FVG. If both surrounding candles align, the FVG receives 5 points. If one aligns, it receives 2 points. If neither aligns, it receives zero. This metric reflects the consistency of direction across the three-candle formation.
Axis 2: Volume Delta (0 to 25 points)
Volume reflects how much activity occurred, while volume delta separates that activity into directional components based on price movement. By analyzing lower timeframe data, volume can be divided into buying and selling activity within the displacement candle, providing additional context on how volume was distributed during the move.
The indicator uses lower timeframe intrabar data (configurable, default 1 minute) to estimate this distribution. Each lower timeframe candle within the displacement bar is classified as bullish volume (close above open) or bearish volume (close at or below open), and these values are aggregated to form a directional breakdown.
This axis evaluates three sub-metrics. LTF dominance (0 to 12 points) measures the percentage of total volume on the displacement candle that aligns with the FVG direction. Values above 75% receive 12 points, 60% to 75% receive 8 points, 50% to 60% receive 4 points, and values below 50% receive zero.
Relative volume (0 to 8 points) compares the displacement candle’s volume to the 20-period volume average. Volume equal to or greater than 2 times the average receives 8 points, 1.5x to 2x receives 5 points, 1x to 1.5x receives 2 points, and values below the average receive zero.
Volume rising (0 to 5 points) evaluates whether volume increases across the three candles of the formation, where volume on the displacement candle exceeds the prior candle, and the prior candle exceeds the one before it. This metric captures the progression of volume across the formation.
Screenshot: Zoomed view showing the Delta volume panel below with visible volume spike on the displacement candle]
Axis 3: Contextual Location (0 to 25 points)
The location of an FVG within the recent price range provides additional context for how it formed. In ICT methodology, the range is often divided into two halves using the equilibrium (50%) level. The lower half is referred to as the “discount zone,” while the upper half is referred to as the “premium zone.”
A bullish FVG forming in the lower portion of the range is positioned within the discount zone, while a bearish FVG forming in the upper portion is positioned within the premium zone. FVGs that form closer to the midpoint or on the opposite side of the range can be described as having different contextual positioning relative to the defined range.
This indicator incorporates that positioning into its scoring by evaluating where the FVG forms within the selected lookback range, using a proportional approach rather than a fixed cutoff at the midpoint.
In addition to premium and discount positioning, other contextual factors can be used to describe how an FVG forms within the broader price environment. These include whether the FVG appears after a liquidity sweep, whether it is positioned within a higher timeframe FVG, and whether it forms during specific session windows. These elements provide additional structure for evaluating the formation context.
This axis evaluates four sub-metrics. Premium and Discount scoring (0 to 8 points) uses a proportional gradient across the recent price range defined by the Range Lookback setting. For bullish FVGs, gaps forming in the lower half of the range (below equilibrium) receive the full 8 points. Gaps forming above equilibrium receive a reduced score that decreases progressively as the FVG approaches the top of the range. The same logic is applied in reverse for bearish FVGs.
HTF FVG nesting (0 to 8 points) evaluates whether the current FVG is fully contained within a higher timeframe FVG of the same direction. The indicator retrieves higher timeframe data using the configurable HTF input and checks for this containment condition.
Post-sweep proximity (0 to 5 points) evaluates whether a swing level was exceeded shortly before the FVG formed. A sweep is defined as price moving beyond a swing high or swing low and then returning back within the prior range. This metric checks for that condition within a configurable lookback window.
Killzone timing (0 to 4 points) evaluates whether the FVG forms during predefined session windows. The indicator converts bar time to New York time and checks against four intervals: Asian session (20:00 to 00:00), London session (02:00 to 05:00), New York AM (09:30 to 11:00), and New York PM (13:30 to 16:00).
Axis 4: Structural Alignment (0 to 25 points)
Market structure provides a framework for describing how price is evolving over time. This axis evaluates how the direction of an FVG relates to the current structure defined by swing highs and swing lows.
The indicator identifies swing highs and swing lows using pivot detection with a configurable swing length and evaluates three sub-metrics. Market structure classification (0 to 10 points) compares the most recent swing highs and swing lows to determine whether price is forming higher highs and higher lows, lower highs and lower lows, or a mixed sequence. These conditions are labeled as bullish, bearish, or mixed. Scoring is then assigned based on the relationship between the FVG direction and the identified structure.
EMA alignment (0 to 8 points) evaluates the position of price relative to a configurable Exponential Moving Average (default 50 period). For bullish FVGs, higher scores are assigned when price is positioned above the EMA, while for bearish FVGs, higher scores are assigned when price is positioned below the EMA. Scores are reduced when price is positioned on the opposite side relative to the FVG direction.
Recent BOS detection (0 to 7 points) evaluates whether a Break of Structure (BOS) has occurred within a configurable lookback window (default 20 bars). A BOS is defined as price closing beyond a recent swing high or swing low. The indicator uses crossover logic to identify these events and ensures each structural break is only counted once. Scoring is based on whether a recent BOS aligns with, differs from, or is absent relative to the FVG direction.
Screenshot: Showing BoS and HH
Grade Assignment System
Instead of using a single composite score cutoff, FVG Quality Scorer applies a per-axis threshold system for grade assignment. For each grade level (A, B, C), you can define which axes are required and the minimum score each must meet. An FVG must satisfy all required axis thresholds to be assigned a given grade. This structure ensures that each selected dimension is evaluated independently rather than relying on a single averaged value.
For example, with default settings, an A grade requires all four axes to meet a minimum score of 12 out of 25. A B grade requires only the Displacement and Volume axes to meet a minimum of 12, while a C grade requires those same axes to meet a minimum of 8. Any FVG that does not meet the criteria for A, B, or C is assigned a D grade. These thresholds and required axes can be fully customized for each grade level.
A weighted composite score (0 to 100) is also calculated and displayed in the score label tooltip for reference, but it does not determine the assigned grade. This allows the grading system to operate independently of the composite value. The composite score uses configurable axis weights (default 25 per axis), which can be adjusted to modify how each dimension contributes to the total score.
Lifecycle State Machine
Each FVG is tracked through a series of lifecycle states as price interacts with the zone, and these transitions occur automatically regardless of grade. The lifecycle begins at Fresh when the FVG forms and no candle has interacted with the zone boundary. When price first wicks into the boundary (detected using crossover logic that excludes the formation candle), the state transitions to Tested.
If price closes within the zone, the state changes to Partially Filled, and the visual appearance of the box is adjusted to reflect this state. If price later closes back outside the zone, the state returns to Tested rather than Fresh, as the zone has already been interacted with. When price fully crosses through the zone, the FVG is marked as Mitigated. The definition of mitigation can be configured to require either a wick crossing or a full candle close beyond the zone.
Mitigated FVGs can either be removed from the chart or remain visible as dimmed boxes using the Show Historic setting. When mitigation occurs, the right edge of the box is fixed at the candle where the event took place. The current lifecycle state is displayed in the tooltip alongside the scoring breakdown when hovering over the score label.
🔹 Dashboard
The dashboard provides a statistical summary of FVG activity across the visible chart history. It is structured as a table with one row per grade (A through D) and three data columns. The Active column displays the number of unmitigated FVGs currently present on the chart for each grade. The Total column shows the total number of FVGs formed for each grade across the chart history. The Avg Fill Time column displays the average number of bars between formation and mitigation for FVGs of that grade that have been fully mitigated. This calculation includes only completed (mitigated) FVGs.
A bottom row in the dashboard tracks the nearest active A-grade FVG relative to the current price. It displays the distance from the current close to the nearest boundary of the zone (the lower boundary if the FVG is above price, or the upper boundary if below), along with a directional indicator. If price is currently within an A-grade zone, the dashboard displays “Inside zone.” If no A-grade FVGs are active, it displays “None active.” The dashboard position and text size can be configured.
Screenshot: Close up of the dashboard table showing all four grade rows with Active, Total, and Avg Fill Time populated. Include the Nearest A row showing a directional arrow with distance.
🔹 Score Labels and Tooltips
Each FVG box displays its grade letter (A, B, C, or D) centered inside the zone. At the right edge of the box, a small label shows the composite quality score out of 100. Hovering over this label reveals a detailed tooltip with the complete scoring breakdown: the total score, the grade, individual scores for all four axes (each out of 25), and the current lifecycle state. This gives you instant access to why a particular FVG earned its grade without needing to open any settings. Score labels can be toggled off using the Show Score Labels setting if you prefer a cleaner chart.
INPUTS:
🔹 Settings
◇ Swing Length: Lookback period for pivot high and pivot low detection used in market structure analysis, BOS tracking, and sweep detection. Higher values produce fewer, more significant swing points. Default 5.
◇ ATR Length: Period for the Average True Range calculation used in displacement scoring. Default 14.
◇ LTF for Volume Delta: Lower timeframe used to calculate intrabar volume delta on the displacement candle. Default 1 minute. Must be lower than the chart timeframe for accurate results.
◇ HTF for FVG Nesting: Higher timeframe checked for FVG nesting confluence. Default 60 minutes (1 hour). Should be higher than the chart timeframe.
◇ Range Lookback: Number of bars used to calculate the premium and discount range for contextual scoring. Default 50.
◇ Sweep Proximity Window: Number of bars to look back for recent liquidity sweeps when scoring post sweep proximity. Default 5.
◇ BOS/CHoCH Lookback: Maximum number of bars a Break of Structure can be from the current bar and still be considered "recent" for structural scoring. Default 20.
◇ EMA Length: Period for the Exponential Moving Average used in structural alignment scoring. Default 50.
◇ Mitigation Method: Determines how FVG invalidation is measured. Wick mode triggers mitigation when a wick crosses through the zone. Close mode requires a candle close beyond the zone. Default Wick.
Screenshot of the Settings input group in TradingView showing all the configurable parameters: Swing Length, ATR Length, LTF, HTF, Range Lookback, Sweep Window, BOS Lookback, EMA Length, and Mitigation Method.
🔹 Axis Weights
◇ Displacement Weight: Relative weight applied to the Displacement Strength axis when calculating the composite score displayed in the tooltip. Higher weight increases this axis's influence on the total score. Default 25.
◇ Volume Delta Weight: Relative weight for the Volume Delta axis. Default 25.
◇ Contextual Weight: Relative weight for the Contextual Location axis. Default 25.
◇ Structural Weight: Relative weight for the Structural Alignment axis. Default 25.
🔹 Display
◇ Minimum Display Grade: Hides FVGs below this grade threshold from the chart. Set to D to show all grades, or A to show only the highest quality gaps. Default C.
◇ Show Historic (Mitigated): When enabled, mitigated FVGs remain visible as grayed out boxes instead of being removed from the chart. Useful for studying how different grade levels performed historically. Default off.
◇ Show Score Labels: Toggles the score labels at the right edge of each FVG box. Hover over the label to see the full axis breakdown tooltip. Default on.
◇ Grade Colors (A → D): Four color pickers on a single row controlling the color for each grade tier. Defaults are green (A), teal (B), amber (C), and gray (D).
🔹 Dashboard
◇ Show Dashboard: Toggles the statistics dashboard on or off. Default on.
◇ Dashboard Position: Choose from all nine screen positions (top, middle, bottom combined with left, center, right). Default Top Right.
◇ Dashboard Size: Controls the text size of the dashboard. Options are Tiny, Small, Normal, and Large. Default Small.
🔹 A Grade / B Grade / C Grade
◇ Each grade tier has its own settings group with four minimum score thresholds (one per axis, 0 to 25) and four toggle switches to select which axes are required for that grade. An FVG must meet or exceed the minimum score on every required axis to earn the grade. Grades are checked top down: A first, then B, then C. Any FVG that fails all three checks receives a D grade. Unchecking a required axis means that axis is ignored for that grade's evaluation, allowing you to create grade profiles that focus on specific quality dimensions.
Screenshot of the settings panel showing the A Grade, and B Grade input groups with their min score thresholds and require toggles visible.
ALERTS:
◇ New A Grade FVG: Fires when a new Fair Value Gap is detected that meets all A grade requirements. Use this to get notified of the highest quality setups without watching the chart continuously.
◇ New B Grade FVG: Fires when a new Fair Value Gap is detected that meets B grade requirements but does not qualify for A grade.
UNIQUENESS:
Many FVG indicators on TradingView focus on detecting gaps and may include basic filtering based on size or direction. FVG Quality Scorer extends this approach by evaluating each gap across multiple dimensions, including lower timeframe volume distribution, higher timeframe positioning, market structure classification, and session-based context. These factors are combined into a structured scoring framework.
The axis-based grading system provides an alternative to single-threshold scoring methods. Instead of relying on a single composite cutoff, each grade level is determined by minimum requirements across selected axes. This ensures that each specified dimension meets defined criteria rather than being offset by higher values in other areas.
The lifecycle state system tracks how each FVG evolves as price interacts with the zone, while the dashboard aggregates metrics such as counts and average bars to mitigation across grade levels. These features provide a structured way to review how FVGs have behaved over the selected chart history and to adjust grading configurations accordingly. Indicateur

FVG with Probabilities | GainzAlgoFVG with Probabilities
The FVG Quality Engine v5.1 is a high-performance, institutional-grade toolkit specifically designed for the volatile nature of 0DTE options and lower-timeframe scalp trading.
Unlike standard gap detectors, this engine utilizes a complex scoring model to quantify the probability of a Fair Value Gap (FVG) holding or failing in real-time.
The Theory of the Fair Value Gap (FVG)
At its core, a Fair Value Gap represents a market imbalance. It is a three-candle sequence where price moves so rapidly that it leaves behind a structural void where only one side of the market was efficiently filled.
The Displacement: An FVG is only as strong as the energy behind it.
This indicator requires displacement, meaning the candle must be large relative to volatility (ATR) and possess a solid body with minimal wicks.
The Rebalance Magnet: Price has a natural tendency to return to these imbalances to find fair value.
The engine tracks the Consequent Encroachment (CE), or the 50% midpoint of the gap, which often serves as the most sensitive reaction level.
Inversion (IFVG): When price fails to respect an FVG and instead closes with displacement on the opposite side, the gap flips.
A bullish FVG that is closed through becomes a bearish resistance zone, known as an Inversion FVG.
The Quality Scoring Model: Probabilities and Values
The indicator calculates a probability score for every gap (clamped between 4% and 85%) to help distinguish between low-quality noise and high-confluence setups. This is a weighted logit model based on eight key factors:
P/D Alignment (1.5x Weight): Checks if a long is in discount or a short is in premium relative to recent swing points.
Market Structure (1.3x Weight): Alignment with a recent Break of Structure (BOS).
Size/ATR Ratio (1.2x Weight): Gaps that are too small or excessively large relative to volatility are downgraded.
Trend & HTF (1.0x Weight): Alignment with the 20/50 EMA stack and the 200 HTF EMA.
Volatility Regime (0.9x Weight): Higher scores during expansion, reduced scores during compression.
Volume (0.8x Weight): Uses Relative Volume (RVOL) to confirm institutional participation.
Killzones (0.7x Weight): Gaps formed during London or New York sessions receive a boost.
Comprehensive Menu Inputs
FVG Detection & Displacement
Min FVG Size (ATR x): Controls sensitivity. Default of 0.3 ATR ensures meaningful gaps only.
Require Displacement: Middle candle must meet a minimum body-to-range ratio (default 0.6).
IFVG Rules (The Flip Logic)
Track IFVGs: Enables conversion of failed gaps into inversion zones.
Min Close Dist: Requires price to close at least 0.3 ATR beyond the gap.
Req Aligned BOS: Strict filter requiring a structural break for IFVG validation.
Signal Engine
Signal Mode
Choose between Trend Only, Reversal Only, or Both.
Require Confirmation: Waits for opposing displacement after FVG/OB/Sweep interaction.
Trigger on CE Tap: Signals when price taps the 50% level of a high-quality FVG.
Time-of-Day Filter
Skip First/Last N Minutes: Avoids open volatility and end-of-day noise.
Skip Lunch: Filters out low-volume periods between 11:30 and 13:30 NY time.
How to Use the Indicator
Step 1: Identify the Bias: Use the dashboard to determine if the setup is trend or reversal. Look for EMA alignment: 20 EMA above 50 EMA and price above 200 EMA.
Step 2: Filter by Quality: Focus only on gaps labeled H (High) or M (Medium). High-quality gaps (>65%) indicate strong confluence.
Step 3: Entry Confluence: The best entries occur at A+ tier setups. These happen when price retests a high-scoring FVG or OB within a killzone and is followed by confirmation.
Step 4: Managing Inversions: If a bullish gap fails, do not ignore it. Watch for it to flip into a purple IFVG, acting as resistance for potential reversal or continuation.
Indicateur

FVG (Fair value Gap) MTF by DANThe Advanced Multi Timeframe FVG Dashboard is a tool built for traders who trade the FVG (Fair value gap) concept by ICT. this tool helps monitor FVG creation and mitigation across 5 pairs across 5 major timeframes (m30,h1,h4,daily,weekly) simultaneously.
Core Features:
The Ultimate MTF Dashboard: Instantly track Fair Value Gap states across M30, H1, H4, Daily, and Weekly timeframes. it highlights when a new FVG forms (OPEN) and exactly when price mitigates it (FILL). GREEN FOR BULLISH FVG, RED FOR BEARISH FVG.
Multi-Pair Screening: Monitor your active chart plus up to 4 additional extra pairs of your choice (Forex, Crypto, Indices, etc.). Leave a slot empty and the dashboard seamlessly hides it to keep your screen clean.
Distraction-Free Visuals: The indicator natively calculates and draws the precise Top and Bottom boundaries of the FVG, alongside an optional feature to custom-paint the displacement candle itself (Candle 2). it draws a horizontal line between candle 1 and 3 of the most recent FVG confirmation only, but it colors previous fvg formation candles.
ALERTS: you can set an alert for both FVG creation and mitigation, simple toggle timeframe, pair and alerts type in settings, and you are good to go
Who is this for?
If you are an ICT or Smart Money Concepts (SMC) trader who misses high-timeframe PA shifts, this tool is designed for you. Indicateur

Indicateur

Indicateur

FVG Touch Extension [TAG]FVG Touch Extension highlights Fair Value Gaps using a simple three-candle imbalance model and extends each zone to the right until price revisits it.
This indicator is designed to help traders identify price areas where the market moved with enough speed and aggression to leave an imbalance behind. In practical terms, these are zones where one side of the market was clearly stronger than the other, causing price to move through levels quickly instead of trading efficiently through them.
How the script defines an FVG
This script uses a three-candle structure:
Bullish FVG
A bullish gap exists when the low of candle 3 is above the high of candle 1
The empty space between those two prices is the bullish FVG
Bearish FVG
A bearish gap exists when the high of candle 3 is below the low of candle 1
The empty space between those two prices is the bearish FVG
To filter out weak or meaningless gaps, the script only plots an FVG when the gap size is at least a user-defined percentage of the size of candle 2. By default, that threshold is 40%.
Why Fair Value Gaps matter
At Alpha Group, we interpret an FVG as a sign of liquidity imbalance.
When a bullish FVG appears, it suggests that buying pressure was aggressive enough to move through available liquidity quickly. In other words, buyers were willing to keep paying higher prices, and the market moved fast because there was not enough sell-side liquidity at those levels to absorb that flow in a balanced way.
When a bearish FVG appears, the logic is the opposite. Selling pressure was aggressive enough to consume the available bids quickly, forcing price lower as sellers hit the market with more urgency than the available buy-side liquidity could absorb.
That is why these zones matter. They often represent areas where the market moved too efficiently in one direction and may later return to reassess that imbalance.
How to read the zones
An FVG is not a stand-alone buy or sell signal. It is a market structure and order-flow clue.
When price revisits an FVG, that zone can become a useful decision area for several reasons:
It can act as a pullback zone in a trending market
It can help frame a continuation trade
It can help evaluate whether price is likely to reject or trade through the imbalance
It can provide a cleaner location to judge whether buyers or sellers are still in control
Our internal Alpha Group reading is straightforward:
If price returns to a bullish imbalance and buyers defend it cleanly, that can support a bullish continuation view.
If price returns to a bearish imbalance and sellers defend it cleanly, that can support a bearish continuation view.
If price trades through the zone easily, the original imbalance may no longer be respected, and the market may be signaling weaker conviction from the side that created it.
Extension logic
Each FVG is drawn as a box and extends to the right until price touches the zone.
This matters because the indicator is trying to preserve the practical usefulness of the imbalance:
If price has not returned to that area yet, the zone remains active and continues extending
Once price touches the zone, the extension stops, marking the first revisit
This gives traders a cleaner view of which imbalances are still untouched and which ones have already been tested.
Color logic
This script colors FVGs based on their location relative to the current price:
Green: FVG below the current price
Red: FVG above the current price
This is a visual context feature. It helps quickly distinguish whether the gap is currently under price or above price without forcing the trader to manually inspect each zone.
Inputs
Minimum Gap Size as % of Candle 2
Filters out small gaps. Default is 40%.
Use Candle 2 Body Instead of Full Range
Lets you compare the gap against either the full candle range or only the candle body.
Maximum Active/Stored FVGs
Controls how many zones remain stored and displayed.
Best use cases
This tool is best used as a context indicator, not as a complete trading system by itself.
It can be useful for:
Trend pullback analysis
Intraday continuation setups
Breakout retest planning
Structure-based discretionary trading
Confluence with market structure, support/resistance, order blocks, session levels, or volume
Important note
This script identifies a specific technical condition based on price gaps across a three-candle sequence. It does not predict direction by itself and should not be treated as financial advice or as a guaranteed edge. Use it as one part of a broader decision process. Indicateur

Fair Value Gap Profile + Rolling POC [BigBeluga]🔵 OVERVIEW
FVG Profile builds a price-level profile based on detected Fair Value Gaps (FVGs) over a fixed lookback period.
Instead of measuring traded volume alone, this tool aggregates bullish and bearish FVG occurrences into horizontal bins, allowing traders to see where price inefficiencies are most concentrated.
Each profile level represents how many bullish and bearish FVGs formed near that price zone, along with their relative strength, imbalance, and delta volume.
🔵 CONCEPTS
FVG Detection —
• Bullish FVG: when the high two bars back is below the current low.
• Bearish FVG: when the low two bars back is above the current high.
Price Binning — The full price range of the lookback period is divided into fixed bins.
FVG Aggregation — Each detected FVG is mapped to its nearest price bin and counted.
Directional Separation — Bullish and bearish FVGs are stored separately inside each bin.
🔵 FEATURES
Bull / Bear FVG Profile —
• Green segments represent bullish FVG counts.
• Orange segments represent bearish FVG counts.
• Each bin visually shows how many FVGs occurred at that level.
Strength Percentage —
• Each bin displays a % value based on total FVG count.
• The strongest bin is normalized to 100%.
Delta Volume —
• Calculates the difference between bullish and bearish FVG volume per bin.
• Positive delta = bullish dominance.
• Negative delta = bearish dominance.
Heatmap Mode —
• Colors profile levels by relative strength.
• Color direction is driven by delta volume (bullish vs bearish).
Live FVG Visualization — Optionally plots individual bullish and bearish FVG boxes on the chart.
Profile Background — A background frame highlights the full analyzed price range.
🔵 Rolling POC Logic
Unlike a static profile, the Rolling POC moves with price.
It continuously calculates the "peak imbalance level" for the last X bars, providing a moving average of where the market's most significant gaps are forming.
🔵 Moving Average Integration
The indicator features a customizable Moving Average (SMA, EMA, WMA, VWMA, etc.).
This MA helps identify if the price is currently trending toward or away from high-density FVG zones.
An "Auto" length feature is included that scales the MA based on the selected lookback period for optimal smoothing.
🔵 HOW TO USE
Identify FVG Clusters — Strong profile levels highlight prices where inefficiencies repeatedly formed.
Directional Bias — Compare bullish vs bearish segments to determine dominance at each level.
Delta Confirmation — Use delta volume to confirm whether bullish or bearish FVGs control the zone.
Reaction Zones — High-strength bins often act as areas of interest for price reactions.
Heatmap Context — Enable heatmap to quickly spot dominant imbalance zones across the range.
🔵 CONCLUSION
FVG Profile transforms Fair Value Gaps into a structured price-level profile, revealing where inefficiencies cluster and which side dominates those zones.
By combining FVG count, directional balance, delta volume, and strength normalization, it provides a powerful way to analyze imbalance behavior beyond traditional volume profiles. Indicateur

Auto Fair Value Gap (FVG) Pro [identityKa]Overview
The Auto Fair Value Gap (FVG) Pro is an essential Smart Money Concepts (SMC) tool engineered to detect and highlight institutional price imbalances. An FVG occurs when strong momentum creates a gap in price delivery, leaving an inefficiency between buyers and sellers. This script mathematically identifies these 3-bar structures in real-time, plotting them as dynamic zones. It goes a step further by offering automated chart mitigation (cleaning) and plotting the highly sought-after 50% Consequent Encroachment (CE) level.
Core Detection & Mitigation Mechanics
The algorithm evaluates price action strictly based on a 3-candle sequence:
Bullish FVG (Demand Imbalance): Identified when the Low of the 3rd candle is strictly higher than the High of the 1st candle, and the 2nd candle is bullish. This creates an unmitigated gap of buy-side liquidity.
Bearish FVG (Supply Imbalance): Identified when the High of the 3rd candle is strictly lower than the Low of the 1st candle, and the 2nd candle is bearish. This creates a sell-side imbalance.
Smart Mitigation (Wick vs. Close): The script allows the user to define what constitutes a "filled" gap. In "Wick" mode, the gap is instantly deleted from the chart the moment a subsequent candle's wick sweeps through the zone. In "Close" mode, the gap remains active until a candle's body strictly closes inside or beyond the zone, ensuring the chart stays clean and only relevant institutional targets remain visible.
The Consequent Encroachment (50% CE)
Institutions frequently target the exact middle of an imbalance. By default, this script draws a dashed line at the exact 50% mathematical equilibrium of every active FVG box. This serves as a precise entry point or target for advanced SMC traders.
HUD Dashboard & AI Logic
The integrated panel provides an instant read on the imbalance bias and risk state:
Dangerous: Displayed whenever the current live price action enters an active FVG zone. This signifies that the gap is actively being filled and high volatility is expected as orders are absorbed.
LONG: Triggered when the last detected FVG was Bullish, indicating that recent institutional momentum was upward and unmitigated demand zones lie below as support.
SHORT: Triggered when the last detected FVG was Bearish, indicating a dominance in sell-side momentum.
How to Use It
This tool is exceptionally powerful for Price Action trading, particularly on 15-minute and 1-hour timeframes where intraday institutional gaps frequently occur and are reliably filled. Traders should not blindly buy or sell when an FVG forms. Instead, use the FVG boxes as high-probability reversal zones. When the AI Suggestion reads "Dangerous" (price is inside the gap), monitor the price action on a lower timeframe. Wait for a rejection from the box—specifically near the 50% CE dashed line—before executing a trade in the direction of the macro trend. Indicateur

Indicateur

Fair Value Gap Rejection AlertsOverview
The Fair Value Gap (FVG) Finder is a versatile Pine Script™ v6 indicator designed to identify price inefficiencies in the market, commonly known as Fair Value Gaps. These gaps represent areas where price has moved rapidly, leaving behind unbalanced regions that often act as support or resistance levels. This script highlights bullish (upward) and bearish (downward) FVGs as colored boxes on your chart, making it easy to spot potential reversal or continuation zones.
Building on standard FVG concepts, this indicator includes advanced features like automatic rejection detection. A rejection occurs when price wicks into the FVG but closes outside it, signaling a potential bounce without filling the gap. Bullish rejections (support bounces) are marked with green upward triangles below the bar, while bearish rejections (resistance bounces) use red downward triangles above the bar. Only the first rejection per FVG is tagged to avoid clutter.
The script also supports alerts for these rejections, allowing you to set up notifications in TradingView for timely trading decisions. Gaps are drawn for a user-defined length but can detect rejections and fills beyond the visible box if needed.
Key Features
FVG Detection: Automatically identifies bullish FVGs (green boxes) when there's an upward price gap exceeding the minimum size, and bearish FVGs (red boxes) for downward gaps.
Rejection Logic: Detects wick-based rejections without gap filling. Bullish: Low enters the FVG but close is above. Bearish: High enters but close is below.
Alerts: Separate alerts for bullish and bearish rejections, configurable via TradingView's alert system (use "alert() function calls only").
Visual Tags: Triangles mark rejection candles for quick visual confirmation.
Customization: Inputs include gap length, minimum gap size (manual or ATR-based), option to show only the latest gap, and delete filled gaps. Style options for colors, label sizes, and more.
Filling Mechanism: Optionally deletes boxes once price fully closes into the gap, indicating it's been mitigated.
How to Use
Add the indicator to your chart via TradingView's Pine Editor.
Adjust inputs in the settings panel:
Gap Length: Controls how far the box extends (default: 60 bars).
Minimum Gap Size: Set manually or auto-adjust with ATR(14) for adaptive filtering.
Only Show Latest Gap: Limits display to the most recent FVG.
Delete Filled Gaps: Removes boxes after price fills them.
Styles: Customize colors and label sizes for better visibility.
Monitor the chart for FVG boxes. Watch for triangle shapes indicating rejections—these often signal entry points (e.g., buy on bullish rejection).
Set up alerts: In TradingView, create alerts based on the indicator's "Bullish FVG Rejection" or "Bearish FVG Rejection" conditions.
Best used on timeframes like 5M-1H for intraday trading, or higher for swing setups. Combine with other tools like volume or trend lines for confirmation.
This indicator is inspired by Inner Circle Trader (ICT) and Smart Money Concepts (SMC) but includes original enhancements like per-gap rejection tracking to prevent multiple signals on the same zone. It does not guarantee profits and should be used as part of a broader strategy with proper risk management.
No external dependencies or subscriptions required—fully self-contained in Pine Script™ v6. Indicateur

Gold Master Hybrid V1 UltraGold Master Hybrid V1 Ultra - The Ultimate Multi-Confluence Trading System
Welcome to the Gold Master Hybrid V1 Ultra, a state-of-the-art, all-in-one trading indicator engineered strictly for serious traders. Built upon a robust 8-Point Multi-Confluence Engine, this indicator bridges the gap between traditional momentum oscillators and modern institutional Smart Money Concepts (SMC).
Whether you are a day trader looking for precise intraday entries or a swing trader aiming to ride massive trend waves, the Gold Master Hybrid acts as your personal, noise-filtering trading assistant. It doesn't just give you raw buy and sell arrows; it evaluates the entire market spectrum—from volatility and volume to deeply embedded institutional price action—before calculating dynamic, mathematically sound targets.
The Core Philosophy
The financial markets are filled with noise. Most standard indicators fail because they evaluate only one dimension of the market (like momentum or trend) and end up printing false signals during ranging or choppy environments.
The Gold Master V1 Ultra solves this by requiring actual "Confluence". Before any signal is generated, our proprietary engine interrogates the market using eight distinct parameters. Only when the absolute majority of these stars align does the indicator grant a "Confirmed Signal."
The Engine - 8 Point Multi-Confluence
The core of the indicator assigns a Score (out of 8) to every single candle based on the following criteria. It asks 8 strict questions:
1. Price vs EMA: Is the current Close Price trading above the fast EMA 9? This ensures short term momentum is heavily in our favor.
2. Moving Average Trend Validation: Has the EMA 9 crossed above the EMA 21 (Bullish Cross)? This validates a structural shift in momentum.
3. Macro Trend Filter: Is the current asset trending above the 50-period Simple Moving Average? We never want to trade against the medium-term trend.
4. RSI Strength: Is the Relative Strength Index (RSI 14) residing in the "Healthy Bullish" zone (between 50 and 70)? If it is below 50, it is weak. If it is above 70, it is overbought. The sweet spot is 50 to 70.
5. MACD Confirmation: Is the MACD line actively leading above its Signal line?
6. Stochastic Filter: Is the Stochastic %K line crossing above the %D line while explicitly avoiding the "Overbought" (>80) extreme?
7. Institutional Volume Surge: Is the current volume surging to at least 1.5x the 20-period moving average volume? This detects big institutional involvement that is required to move the market.
8. SMC Trend Matrix: Is the broader Market Structure currently Bullish? Has it printed an upward Break of Structure recently?
Signal Grading:
- Strong Signal (Score >= 6): An incredibly high-probability setup where the trend, momentum, volume, and structure are perfectly synchronized. Printed as a prominent Triangle marker (Lime for BUY, Red for SELL).
- Weak Signal (Score 4 or 5): A moderate continuation or early-warning setup. Printed as smaller triangles (Teal for Buy, Orange for Sell).
Advanced Signal Noise Reduction
We hate chart clutter. To keep your charts clean and your mind focused, the Gold Master V1 Ultra includes two built-in noise-canceling filters:
Filter 1: Consecutive Confirmation Lock
A signal condition must physically hold and mathematically close for two consecutive candles. This completely annihilates 1-candle fakeout spikes that ruin most strategies.
Filter 2: Strict Cooldown Buffer
Once a signal is printed, the indicator enters a strict 5-candle cooldown phase. During this time, it will completely ignore minor fluctuations and will not print duplicate signals of the same type. This ensures massive readability on any timeframe, avoiding the common issue of printing 5 arrows in a row during a ranging period.
Integrated Smart Money Concepts (SMC)
You no longer need five different indicators on your chart to find institutional levels. The Gold Master handles advanced institutional mapping automatically in the background:
- Market Structure Pivot Labels: Automatically draws Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) so you never lose track of structure.
- BOS & CHoCH: Dynamically plots Break of Structure and Change of Character lines to help you anticipate trend exhaustion or continuation without having to draw trendlines yourself.
- Order Blocks (OB): Scans historical price action to plot highly accurate Bullish (Teal) and Bearish (Red) Order Block zones where banks left pending limit orders.
- Fair Value Gaps (FVG): Instantly highlights market imbalances (FVG+ and FVG-) so you know exactly where price is likely to be magnetized next to fill liquidity voids.
Dynamic Risk Management System (TP & SL)
Stop guessing where to take profit or place your stop. The Gold Master Hybrid V1 Ultra utilizes a custom Average True Range (ATR) algorithm to auto-calculate your trade parameters the instant a Strong Signal appears.
- Dynamic Stop Loss (SL): Placed at exactly 1.5x ATR away from the wick of the signal candle. It adapts to current market volatility to protect you from getting wicked out during high-impact news.
- Take Profit 1 (TP1): Set at 2.0x ATR from your entry. Optimized for safe, high-win-rate scalps.
- Take Profit 2 (TP2): Set at 3.5x ATR from your entry. Optimized for capturing the true meat of the trend.
The Golden R:R Safety Protocol:
Before drawing the SL/TP lines on your chart, the indicator internally calculates the Risk-to-Reward ratio. If the setup doesn't offer at least a 1:1.5 reward-to-risk ratio (based on historical volatility), the indicator completely hides the targets. It is effectively telling you: "This trade is too mathematically risky, skip it." This forces you to be a disciplined trader.
The Command Center Dashboard
At the corner of your chart (Top-Right by default, completely movable in the settings), sits your real-time Command Center. It aggregates all critical data from the indicator into one beautiful UI panel so you never have to look at subcharts:
- Real-time Value Tracking: See the exact status of your EMA, RSI, MACD, and Volume.
- Current Signal Score: Instantly know if the current candle is scoring a 3/8, 5/8, or a perfect 8/8 before the signal even fires.
- Exact Pricing: Displays the precise price coordinates for TP1, TP2, and your SL so you can immediately copy them into your broker.
- R:R tracking: See the exact live Risk-to-Reward ratio of the current setup.
- Time Session Matrix: Know instantly if you are trading in the high-volume London, New York, or Asian session, or if you are in the dead hours.
User Guide - How to Execute Trades
1. Reading the Macro Trend Background
Look closely at the entire background color of your chart. The Gold Master will tint the background Teal if the absolute macro trend is Bullish, and Red if it's Bearish.
Rule #1: Only take Strong BUY signals when the background is Teal. Never trade against the macro trend.
2. The Golden Setup (Finding Institutional Confluence)
A Strong Signal alone is great. But a Strong Signal that prints exactly inside an auto-drawn Bullish Order Block or inside a Fair Value Gap (FVG+) is a "God-Tier" setup. You want to layer the confluences. If your Buy signal happens right as price touches the demand zone, that is your highest probability entry.
3. Wait for the Candle to Close
Because the engine relies on a 2-candle confirmation filter, you must wait for the current candle to mathematically close before considering the signal valid. Do not enter a trade while the candle is still moving.
Pro-Tip: Use TradingView's alert system and set the condition to "Once Per Bar Close" to let the indicator notify your phone automatically when a valid, locked-in signal has occurred.
4. Execution and SL/TP Placement
When a Buy signal flashes and you take the trade, immediately look at the dashboard (or the lines drawn on the chart) and place your Stop Loss exactly where the red line tells you to. Place your Take Profit at the green TP1 or TP2 line depending on your risk appetite. Do not move your Stop Loss arbitrarily—the ATR calculation placed it there for a mathematical reason.
5. Customizing to Your Specific Asset
Every asset breathes differently. Gold (XAUUSD) moves differently than EURUSD, which moves differently than Bitcoin.
If you are trading extremely volatile Crypto, go into the indicator settings (click the gear icon next to the indicator name) and increase the "ATR Multiplier (SL)" from 1.5 to 2.0 to give your trades more breathing room.
If you are scalping the 1-minute chart, you might want to reduce the TP1 multiplier to 1.5. You can customize every aspect visually from the settings menu without touching the code.
6. Dashboard Movement
If the dashboard is blocking your view of current price action, click the gear icon settings for the indicator, go to the "Dashboard" section, and switch the "Dashboard Position" from Top Right to Top Left, Bottom Right, or Bottom Left.
Conclusion
The Gold Master Hybrid V1 Ultra is not a magic wand, but it is one of the strictest, most logical institutional trading systems available today. By forcing you to wait for 8 points of confluence, keeping your charts clean, calculating ATR-based risk management, and preventing you from taking terrible R:R trades, it physically forces you to trade like an institution rather than an emotional retail trader.
(Disclaimer: Trading financial markets involves significant risk. The Gold Master Hybrid V1 Ultra is a highly advanced analytical tool designed to assist your decision-making, but it does not constitute financial advice. Always test strategies on a demo account before risking real capital.) Indicateur

Prism Orderflow Detector [JOAT]Prism Orderflow Detector
Introduction
The Prism Orderflow Detector is an open-source institutional liquidity and order flow system that combines Smart Money Concepts (SMC), liquidity pool detection, Fair Value Gap analysis, Order Block identification, and advanced orderflow strength measurement into a unified overlay indicator. This comprehensive system integrates multiple proven institutional trading methodologies to identify high-probability zones where smart money positioning and retail liquidity intersect.
The indicator is designed for traders who understand that institutional players move markets by targeting liquidity pools, creating imbalances, and establishing positions through Order Blocks. By synthesizing liquidity detection, Fair Value Gaps, Order Blocks, Breaker Blocks, market structure analysis, and real-time orderflow strength measurement, this tool helps identify structural market inflection points with institutional-grade precision.
Why This Integration Exists
This indicator combines eight distinct institutional analysis frameworks that complement each other:
Liquidity Pool Detection: Identifies equal highs/lows and swing points where retail stops cluster
Order Block Analysis: Tracks institutional accumulation and distribution zones
Fair Value Gap Identification: Detects price inefficiencies created by rapid institutional moves
Breaker Block Recognition: Identifies failed Order Blocks that become new support/resistance
Market Structure Mapping: Tracks Break of Structure (BOS) and Change of Character (CHoCH)
Liquidity Heatmap Analysis: Visualizes liquidity concentration across price levels
Volume Delta Tracking: Measures real-time buying versus selling pressure
Orderflow Strength Measurement: Quantifies institutional pressure across multiple factors
Each component addresses different aspects of institutional order flow. Liquidity detection reveals where stops are hunted, Order Blocks show where institutions positioned, Fair Value Gaps indicate rapid institutional moves, market structure provides trend context, and orderflow strength quantifies current institutional pressure. Together, they create a comprehensive view of smart money activity and retail liquidity targeting.
Core Components Explained
1. Advanced Liquidity Detection System
The system identifies multiple types of liquidity pools:
Equal Highs (Buy-Side Liquidity):
Equal High Threshold = high * (threshold_percentage / 100)
Equal High Condition = (high == high ) OR (abs(high - high ) <= threshold AND high > high )
Valid Equal High = Equal High Condition AND high == highest(high, lookback_period)
Equal Lows (Sell-Side Liquidity):
Equal Low Threshold = low * (threshold_percentage / 100)
Equal Low Condition = (low == low ) OR (abs(low - low ) <= threshold AND low < low )
Valid Equal Low = Equal Low Condition AND low == lowest(low, lookback_period)
Liquidity Sweeps:
- Bullish Sweep: Price breaks below recent lows but closes back above
- Bearish Sweep: Price breaks above recent highs but closes back below
These sweeps often precede significant moves as institutions trigger retail stops before establishing positions.
2. Order Block Detection Engine
Order Blocks represent the last opposite-direction move before a strong impulse:
Bullish Order Block:
Bullish OB = close < open AND close > open AND
close > high AND (high - low ) > (ATR * strength_multiplier)
Bearish Order Block:
Bearish OB = close > open AND close < open AND
close < low AND (high - low ) > (ATR * strength_multiplier)
Order Blocks are displayed as gradient boxes with diagonal lines and extend forward to show ongoing relevance.
3. Fair Value Gap Analysis
Fair Value Gaps represent price inefficiencies where institutions moved price rapidly:
Bullish FVG:
Bullish FVG = low > high AND close > open
FVG Size = ((low - high ) / close) * 100
Valid Bullish FVG = Bullish FVG AND FVG Size >= minimum_size_percentage
Bearish FVG:
Bearish FVG = high < low AND close < open
FVG Size = ((low - high ) / close) * 100
Valid Bearish FVG = Bearish FVG AND FVG Size >= minimum_size_percentage
FVGs are displayed as horizontal lines with gradient fills and often get filled (retested) later.
4. Breaker Block System
Breaker Blocks are failed Order Blocks that become new support/resistance:
Bullish Breaker: Failed bearish Order Block that price breaks above
Bearish Breaker: Failed bullish Order Block that price breaks below
These represent significant shifts in market structure and often provide strong reversal zones.
5. Market Structure Analysis
Tracks institutional trend changes through structure breaks:
Break of Structure (BOS):
- Bullish BOS: New higher high with strong momentum
- Bearish BOS: New lower low with strong momentum
Change of Character (CHoCH):
- Bullish CHoCH: Lower low followed by higher high (trend change)
- Bearish CHoCH: Higher high followed by lower low (trend change)
6. Advanced Orderflow Features
Liquidity Heatmap:
Tracks liquidity concentration by counting touches at key levels over specified periods. High-intensity areas (>80% touch count) are highlighted as significant liquidity zones.
Volume Delta Analysis:
Buy Volume = close > open ? volume : 0
Sell Volume = close < open ? volume : 0
Volume Delta = sma(Buy Volume - Sell Volume, 14)
Volume Delta Normalized = (Volume Delta / sma(volume, 14)) * 100
Strong delta (>50) indicates institutional accumulation or distribution.
Imbalance Zone Detection:
Enhanced Fair Value Gap detection for larger inefficiencies:
Bullish Imbalance = low > high AND (low - high ) > (ATR * 0.5)
Bearish Imbalance = high < low AND (low - high) > (ATR * 0.5)
Premium/Discount Zones:
Price Range = highest(high, 50) - lowest(low, 50)
Equilibrium = lowest(low, 50) + (Price Range / 2)
Premium Zone = close > equilibrium + (Price Range * 0.25)
Discount Zone = close < equilibrium - (Price Range * 0.25)
7. Orderflow Strength Meter
Real-time quantification of institutional pressure:
Orderflow Strength = Order Block Factor + FVG Factor + Sweep Factor +
Volume Delta Factor + Structure Factor
Components:
- Order Block: ±20 points for new OBs
- FVG: ±15 points for valid FVGs
- Sweeps: ±25 points for liquidity sweeps
- Volume Delta: ±30 points (normalized)
- Structure: ±20 points for BOS/CHoCH
Strength classifications:
- Extreme Bull/Bear Pressure: >±60
- Strong Bull/Bear Pressure: >±30
Visual Elements
Liquidity Arrows: Directional arrows for equal highs/lows with clean labels
Liquidity Sweeps: Arrow lines showing sweep direction with "SWEEP" labels
Order Block Boxes: Gradient boxes with diagonal lines and "OB" labels
Fair Value Gap Lines: Horizontal lines with gradient fills and "FVG" labels
Breaker Diamonds: Diamond markers for failed Order Blocks with "BRK" labels
Structure Arrows: CHoCH arrows with directional labels
Imbalance Zones: Boxes with crossing diagonal lines and "IMB" labels
Liquidity Heatmap: Significant liquidity levels with "LIQ" labels
Volume Delta Markers: "Δ+" and "Δ-" labels for extreme volume pressure
Orderflow Background: Subtle background coloring for extreme pressure states
Dashboard: Comprehensive real-time status of all orderflow components
How Components Work Together
The integration creates a layered institutional analysis approach:
Layer 1 - Liquidity Mapping: Equal highs/lows and swing points reveal where retail stops cluster
Layer 2 - Institutional Positioning: Order Blocks show where smart money accumulated/distributed
Layer 3 - Price Inefficiencies: Fair Value Gaps indicate rapid institutional moves
Layer 4 - Structure Context: BOS/CHoCH provide trend and reversal context
Layer 5 - Failed Levels: Breaker Blocks show where previous levels failed
Layer 6 - Flow Analysis: Volume delta and heatmaps reveal current institutional pressure
Layer 7 - Strength Synthesis: Orderflow strength meter quantifies overall institutional activity
Example scenario: Price approaches equal lows (Layer 1) where a bullish Order Block exists (Layer 2), creating a Fair Value Gap on the move up (Layer 3), with bullish CHoCH confirming trend change (Layer 4), strong positive volume delta (Layer 6), and extreme bullish orderflow strength (Layer 7). This confluence suggests high-probability long opportunity.
Input Parameters
Liquidity Settings:
Show Equal Highs/Lows: Toggle liquidity pool display
Equal Price Threshold: Percentage tolerance for equal levels (default: 0.1%)
Liquidity Lookback: Period for liquidity level detection (default: 50)
Order Block Settings:
Show Order Blocks: Toggle Order Block display
Order Block Strength: ATR multiplier for OB validation (default: 3)
Extend Order Blocks: Forward extension bars (default: 20)
Fair Value Gap Settings:
Show Fair Value Gaps: Toggle FVG display
Min FVG Size: Minimum gap size percentage (default: 0.1%)
Breaker Block Settings:
Show Breaker Blocks: Toggle Breaker display
Breaker Lookback: Period for Breaker detection (default: 20)
Advanced Features:
Show Liquidity Heatmap: Toggle heatmap visualization
Show Volume Delta: Toggle volume pressure display
Show Imbalance Zones: Toggle imbalance detection
Show Premium/Discount Zones: Toggle equilibrium analysis
Show Orderflow Strength: Toggle strength background
Heatmap Period: Lookback for liquidity concentration (default: 100)
How to Use This Indicator
Step 1: Identify Market Structure
Check for recent BOS or CHoCH to understand current trend context and potential reversal zones.
Step 2: Map Liquidity Pools
Locate equal highs/lows and swing points where retail stops are likely clustered.
Step 3: Find Order Blocks
Identify recent Order Blocks where institutions likely positioned for the next move.
Step 4: Check for Fair Value Gaps
Look for unfilled FVGs that price may return to test, especially near Order Blocks.
Step 5: Monitor Liquidity Sweeps
Watch for sweep arrows indicating stop hunting - these often precede strong moves in the opposite direction.
Step 6: Analyze Volume Delta
Confirm institutional flow direction through volume delta analysis - strong delta supports directional bias.
Step 7: Review Orderflow Strength
Check dashboard for current orderflow strength - extreme readings indicate high institutional activity.
Step 8: Wait for Confluence
Best setups occur when multiple factors align: liquidity pools + Order Blocks + structure + volume confirmation.
Best Practices
Use on 15-minute to 4-hour timeframes for optimal institutional detection
Focus on confluence zones where multiple SMC concepts align
Liquidity sweeps provide excellent risk:reward when they fail to sustain
Order Block retests often provide precise entry levels with tight stops
Fair Value Gaps act as magnets - price often returns to fill them
CHoCH signals are more significant than BOS for trend changes
Volume delta confirmation adds conviction to SMC setups
Premium/discount zones help time entries - buy discount, sell premium
Indicator Limitations
Not all liquidity pools get targeted - institutional timing varies
Order Blocks can fail if market structure changes significantly
Fair Value Gaps may never get filled during strong trending moves
Breaker Blocks don't always provide reliable support/resistance
Volume delta can be misleading in low-liquidity conditions
Orderflow strength is reactive, not predictive of future moves
SMC concepts require understanding of institutional behavior
Visual elements can clutter chart - adjust display settings as needed
Technical Implementation
Built with Pine Script v6 using:
Advanced liquidity detection with percentage-based thresholds
Real-time Order Block calculation with ATR-based validation
Dynamic Fair Value Gap identification with size filtering
Breaker Block tracking with lookback period management
Market structure analysis with BOS/CHoCH detection
Volume delta calculation with institutional bias measurement
Orderflow strength meter with multi-factor scoring
Anti-overlap filtering to prevent visual clutter
Comprehensive dashboard with real-time status updates
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its comprehensive SMC integration approach. While individual components (Order Blocks, Fair Value Gaps, liquidity detection, volume analysis) are established Smart Money Concepts, this integration is justified because:
It synthesizes eight distinct SMC methodologies into a unified system
The orderflow strength meter quantifies institutional pressure across multiple factors
Advanced liquidity heatmap visualization shows concentration levels not available elsewhere
Integrated volume delta analysis provides real-time institutional flow confirmation
Premium/discount zone analysis adds equilibrium context to SMC setups
Anti-overlap filtering and clean visual design reduce chart clutter while maintaining functionality
Each component contributes unique institutional information: liquidity detection reveals stop hunting targets, Order Blocks show positioning zones, Fair Value Gaps indicate rapid moves, market structure provides context, and volume analysis confirms flow. The integration's value lies in presenting these complementary SMC perspectives simultaneously with quantified orderflow strength measurement.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Smart Money Concepts and institutional analysis are educational frameworks that do not guarantee future price movement. Past performance and backtested results do not guarantee future results. Market conditions change, and SMC patterns that worked historically may not work in the future.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicateur

Fair Value Range Breakout [by Oberlunar]Fair Value Range Breakout by Oberlunar is a community tool built around higher-timeframe structure and HTF imbalance zones. It reconstructs and draws up to three recent candles from a user-selected HTF and optionally displays their High, Low, Open, and Close levels with configurable styles and colours, keeping HTF candles and FVG ranges readable while working on lower timeframes.
On each confirmed HTF candle close, the script scans the last three closed HTF candles to detect bullish and bearish Fair Value Gaps using either wicks or candle bodies as the reference. You can filter gaps by a minimum size in ticks, keep only the most recent zones, and extend zones to the right for ongoing interaction tracking.
Set the HTF timeframe according to your horizon, such as Daily for swing context or H4-H2 for intraday structure, then enable the HTF candle overlay and choose which OHLC levels to show for each candle. In the HTF FVG settings, pick Wicks for zones that reflect extremes or Bodies for tighter zones, and increase the minimum gap in ticks if you want fewer, cleaner zones. If you use signals, choose “Close inside” for stricter interaction requirements or “Wick touch” for earlier detection, and apply a small exit buffer in ticks when noise is high. A practical workflow is using HTF=2H on a 5m or 15m chart, monitoring price interaction with an HTF FVG zone, and treating the plotted signal as confirmation of a zone exit rather than a standalone entry system.
Attribution and derivative work notice is explicit and intentional.
The HTF candle architecture component is a derivative work based on HTF Candle Architecture by BigBeluga, and the HTF FVG engine is a derivative work based on “Fair Value Gap MTF” by Oberlunar.
The original references are provided above exactly and in the code as required.
Enjoy
Oberlunar 👁️★
Indicateur

Dynamic Delta FVG [LuxAlgo]The Dynamic Delta FVG indicator provides a comprehensive analysis of Fair Value Gaps (FVGs) by integrating intra-bar volume delta to visualize the internal buying and selling pressure within price imbalances.
🔶 USAGE
The script identifies standard Fair Value Gaps and enhances them by splitting the visual representation into two distinct segments based on volume delta. This allows traders to see exactly where institutional aggressive orders were concentrated during the formation of the gap.
Users can utilize this tool to:
Identify high-probability FVGs where the volume delta aligns with the gap direction. Determine specific price levels within a gap that acted as the primary "point of control" for buyers or sellers. Monitor real-time sentiment through a dynamic dashboard that aggregates the delta of all active imbalances. Filter out insignificant market noise using ATR and volume-based threshold settings.
🔹 Detailed Buyer/Seller Tags
Each active FVG features a dynamic tag on the right edge displaying the specific percentage of buying (B) and selling (S) volume that occurred within that price range. The tag background color shifts based on the dominant force, providing an immediate visual cue of the gap's internal strength. These tags move dynamically as the boxes expand, ensuring they always remain at the current price action edge.
🔹 Filter Overlapping
When enabled, the script will automatically remove existing active FVGs that overlap with a new discovery. This ensures only the most recent "current" imbalance is displayed in a specific price zone, preventing visual clutter and focusing on the most relevant institutional levels.
🔹 Mitigation Modes
The script supports two mitigation modes to suit different trading styles:
**Touch:** A gap is considered mitigated as soon as price enters the range. **Full Fill:** A gap remains active until price has completely traversed the entire range of the imbalance.
🔶 DETAILS
The indicator utilizes
request.security_lower_tf()
to fetch granular volume data from lower timeframes (e.g., 1-second data). This allows for a precise calculation of "Buy Volume" versus "Sell Volume". The split in the FVG box represents the ratio of these volumes. For example, if an FVG has 70% buying volume, the green segment will occupy 70% of the vertical height of the box, while the red segment occupies the remaining 30%.
🔹 Aggregate Sentiment Dashboard
The dashboard calculates market strength across all active imbalances rather than just categorizing by gap direction. This means if multiple bullish FVGs contain significant "absorbed" selling volume, the "Seller Strength" metric will accurately reflect this bearish pressure. The Net Sentiment is derived from the net difference between aggregate buyer and seller percentages across all active gaps.
🔶 SETTINGS
🔹 Detection Filters
**Min Volume Threshold:** Multiplier for the 20-period average volume. Gaps forming on volume lower than this threshold are ignored. **Min ATR Magnitude:** Sets the minimum required size of the FVG relative to the current ATR. **Mitigation Mode:** Determines whether a touch or a full fill "closes" the gap. **Filter Overlapping:** When enabled, the script deletes older active gaps that overlap with new ones.
🔹 Volume Delta Analysis
**Delta Timeframe:** The lower timeframe used for volume calculations. Required for higher precision on 1m charts.
🔹 Visuals
**Max Active Gaps:** Limits the number of boxes displayed on the chart (Default: 10). **Buyer/Seller Color:** Customizable colors for the split segments within the FVG. **Show Mitigated Gaps:** When enabled, mitigated gaps remain on the chart with a faded appearance.
🔹 Dashboard
**Show Dashboard:** Toggles the real-time sentiment and imbalance summary table. **Position/Size:** Controls the UI placement and scale of the dashboard. Indicateur

First presented ineficiency indicator - 10 sessions📊 Enhanced FVG Indicator with Multi-Session Support
Overview
The Enhanced FVG (Fair Value Gap) Indicator is a professional-grade tool designed for traders who want to identify and track Fair Value Gaps across multiple trading sessions. This indicator combines advanced FVG detection with smart extension modes, customizable alerts, and automatic instrument calibration.
🎯 What is a Fair Value Gap (FVG)?
A Fair Value Gap occurs when there's a price imbalance in the market, creating a "gap" that the price often revisits. This happens when:
Bullish FVG: The high of candle 2 bars ago is below the low of the current candle
Bearish FVG: The low of candle 2 bars ago is above the high of the current candle
FVGs are powerful supply and demand zones that smart money traders use to identify potential reversal or continuation points.
✨ Key Features
🔟 Multiple Session Support
10 Configurable Sessions: Track FVGs across different time windows throughout the day
Independent Control: Enable/disable each session individually
Custom Session Times: Define your own session hours in any timezone
Unique Colors: Each session has its own customizable color scheme
Session Labels: Clear identification with customizable labels (S1-S10)
🎨 Modern Label System
Text-Only Labels: Clean, modern design without background boxes
9 Position Options: Place labels anywhere on the FVG (Top/Middle/Bottom × Left/Center/Right)
Dynamic Information: Shows session name, direction (↑/↓), and size in points
Adjustable Size: Choose from Tiny, Small, Normal, Large, or Huge text
Custom Colors: Full control over label text color
📏 Smart Extension Modes
1. Follow Current Bar
FVGs dynamically extend to follow the current price action
Configurable bar offset (-50 to +50) to project ahead or stop before current bar
Perfect for real-time trading and keeping your chart clean
2. Until Time
Extend FVGs until a specific time of day (HHMM format)
Ideal for intraday traders with specific market closure times
Example: Stop all FVGs at 1600 (4:00 PM)
3. Until Retest
Automatically stop extending when price retests the FVG
Three sensitivity levels:
Touch: Wick touches the FVG zone
Close Inside: Close price enters the FVG
Full Body Inside: Entire candle body within the FVG
Great for validating FVG fills and trading opportunities
🔔 Advanced Alert System
Creation Alerts: Get notified when a new FVG forms
Format: "FVG Created: S1 ↑ 79pts @ 70339.00-70418.30"
Retest Alerts: One-time alert when price revisits a FVG
Format: "FVG Retested: S1 @ 70380.00"
Configurable: Enable/disable alerts independently
No Spam: Each FVG only triggers one retest alert
🧮 Automatic Point Calculation
The indicator automatically detects your instrument type and calculates FVG size correctly:
Crypto: Bitcoin, Ethereum, Altcoins (÷10 or ÷100)
Forex: All major pairs with correct pip calculation
Futures: ES, NQ, YM, CL, GC with proper point values
Indices: S&P500, NASDAQ, etc. (1 point = 1 point)
Stocks: Penny and dollar stocks (cents calculation)
Manual Override: Option to set custom divisor if needed
🎯 Consequent Encroachment (CE)
Middle Line: Shows the 50% level of each FVG
Customizable Style: Solid, Dashed, or Dotted
Adjustable Thickness: 1-5 pixel width
Custom Color: Match your chart theme
Toggle On/Off: Show or hide as needed
🌍 Timezone Support
4 Major Timezones: America/New_York, UTC, Europe/London, Asia/Tokyo
Session-Based: Define sessions in your preferred timezone
Global Trading: Works for traders anywhere in the world
📋 Default Configuration
Active Sessions (1-5):
Session 1: 09:31-09:49 (Market Open)
Session 2: 09:50-10:30 (Morning Momentum)
Session 3: 10:50-11:10 (Mid-Morning)
Session 4: 11:50-12:10 (Pre-Lunch)
Session 5: 13:30-14:10 (Post-Lunch)
Additional Sessions (6-10): Disabled by default, customize as needed
Colors:
S1: Blue | S2: Purple | S3: Orange | S4: Yellow | S5: Aqua
S6: Green | S7: Red | S8: Fuchsia | S9: Lime | S10: Teal
🚀 How to Use
Basic Setup
Add the indicator to your chart
Select your timezone
Enable desired sessions (1-5 active by default)
Choose your extension mode
Configure alerts if needed
Trading Strategies
Intraday Scalping:
Use "Until Retest" mode with "Touch" sensitivity
Enable alerts for quick entries
Focus on Sessions 1-2 for high volatility
Swing Trading:
Use "Until Time" mode to extend FVGs to market close
Set retest sensitivity to "Close Inside" for confirmation
Track multiple sessions for confluence zones
Smart Money Concepts:
Combine FVGs with order blocks and liquidity zones
Use CE line for partial profit targets
Watch for FVG retests at key support/resistance levels
⚙️ Performance Optimizations
Efficient Rendering: Max 500 boxes, labels, and lines
Historical Limit: Display up to 30 days of FVGs
Memory Management: Inactive FVGs automatically marked
Real-Time Updates: Dynamic extension without lag
📊 Compatible Instruments
✅ Cryptocurrencies (Bitcoin, Ethereum, Altcoins)
✅ Forex Pairs (All majors and crosses)
✅ Futures Contracts (Indices, Commodities, Metals)
✅ Stock Indices (S&P500, NASDAQ, DOW)
✅ Individual Stocks
✅ Any instrument on TradingView
🎓 Understanding FVG Trading
Why FVGs Matter:
Represent inefficient price action
Act as magnets for price retracement
Often mark institutional order flow
High probability reversal zones
Best Practices:
Combine with volume analysis
Use higher timeframe FVGs for stronger zones
Wait for confirmation before entry
Place stops beyond the FVG boundaries
🔧 Customization Options
Visual Settings:
10 session colors
Border color (transparent by default)
CE line color, style, and thickness
Label size, color, and position
Functional Settings:
Extension mode (Follow/Time/Retest)
Bar offset (-50 to +50)
Retest sensitivity (3 levels)
Alert preferences
Calculation Settings:
Auto-detect point divisor
Manual divisor override
Maximum days to display
💡 Tips & Tricks
Reduce Chart Clutter: Disable sessions you don't trade
Session Optimization: Adjust session times to match your market's volatility
Confluence Trading: Enable multiple sessions to find overlapping FVGs
Mobile Trading: Use alerts to trade on-the-go
Backtesting: Increase max days to analyze historical FVG behavior
📝 Version History
v1.0 - Initial Release
10 configurable sessions
3 extension modes
Automatic point calculation
Alert system
Modern label design
Consequent encroachment support
🤝 Support & Feedback
If you find this indicator helpful, please leave a review and share your experience! For questions or feature requests, feel free to comment below.
Happy Trading! 🎯📈
Indicateur

[CT] Displacement FVG Toolkit Displacement FVG Toolkit is a complete ICT market-structure and execution toolkit designed to help you identify when price is truly repricing, where that repricing left inefficiencies, and how to frame trades with clear context, confirmation, and invalidation. The indicator brings together six institutional-grade concepts into one workflow, Displacement, Fair Value Gaps, Reload Zones, Dealing Range premium and discount, CISD, and Market Structure breaks, so you can stop reacting to random candles and start trading the sequence that professional order flow tends to follow, impulse, imbalance, retrace, and continuation or reversal.
The Displacement tool is the engine that decides whether a candle represents meaningful participation or ordinary noise. Displacement is measured by comparing the current candle’s size to the average candle size over a user-defined lookback. You can choose whether the script uses the candle body size or the full high-to-low range for this calculation. When the candle exceeds the average by your selected displacement factor, it is flagged as displacement. Displacement is important because it is the clearest visible clue that the market has moved from balanced auction to aggressive repricing, which is the environment where inefficiencies form and where your best retest trades are born. In the photo, the yellow bars represent the displacement bars, and the indicator prints Buy and Sell markers on those displacement events. The user also has full control to color displacement bars to a color of their choice, so whether you prefer bright yellow, muted gray, or any custom brand color, you can set the exact bullish and bearish displacement bar colors in the inputs. If you do not want bar coloring at all, you can simply turn off displacement bar coloring and use only the markers.
The Structure Filter is a powerful addition that prevents displacement from becoming “any big candle.” When enabled, the indicator requires the displacement candle to also break recent structure, meaning price must break above a recent high for bullish displacement or below a recent low for bearish displacement. You can decide whether the structure break is judged by a candle close beyond the prior structure level or by a wick that pierces it. Close-based structure breaks are cleaner and generally reduce false positives, while wick-based breaks are more sensitive and can trigger earlier at the cost of more noise. This filter matters because a large candle in the middle of chop is not the same as a large candle that actually breaks a meaningful swing point, and the indicator gives you a way to enforce that distinction mechanically.
The Fair Value Gap tool identifies the most valuable type of imbalance, the three-candle FVG, but it only plots those gaps when they are created by validated displacement. A bullish FVG forms when the current candle’s low is above the high from two candles ago, showing that price skipped a region without fully transacting through it. A bearish FVG forms when the current candle’s high is below the low from two candles ago. These gaps represent unfinished auction, a fast repricing that often leaves behind an inefficiency the market may later revisit to rebalance. You can choose to extend FVGs to the right for a set number of bars so you can see the levels well into the future, or you can keep them confined to the period when they formed. You can also choose whether mitigated FVGs remain visible or are hidden. Mitigation in this script means price has traded back into the gap far enough to invalidate it as an active inefficiency, and when that happens you can either keep it on the chart as historical context or remove it to keep your chart clean. The script also manages object limits by keeping only a user-defined maximum number of FVGs, trimming older ones as needed so the indicator remains stable.
Reload Zones are derived directly from the FVGs and are built for execution. Instead of treating the entire gap as the same, the indicator highlights the portion of the imbalance that most often functions as the highest-quality retest area for continuation entries. For bullish FVGs, the Reload Zone is drawn as the upper portion of the gap, and for bearish FVGs it is drawn as the lower portion, which keeps your focus on the retest region that is closest to the direction of repricing and typically provides tighter invalidation. The indicator also includes an optional Invalidation line that marks the far edge of the full FVG, giving you a clean and consistent “line in the sand” for risk management. The intended use is straightforward, you wait for displacement to print and create an FVG, you allow price to retrace into the Reload Zone, and you look for rejection behavior that confirms responsive participation, such as wicks into the zone that close back out, sharp reaction candles, or structure holding in the direction of the displacement. When price accepts inside the zone with multiple closes and slow grind, that’s often a sign the inefficiency is being repaired rather than defended, and the reload entry loses quality. Because reload zones are tied to displacement-generated FVGs, they naturally filter out weaker imbalances and focus you on the kind created during true repricing.
The Dealing Range tool provides context by defining a rolling high-to-low range over a user-defined lookback, then splitting that range into premium and discount. The indicator plots DR High, DR Low, and a DR Mid 50% line, and can optionally show PD 62% and PD 38% reference levels inside the range. The fill visually highlights premium above the midpoint and discount below it, which helps you avoid the most common retail mistake, buying in premium and selling in discount without a strong reason. The dealing range is not meant to be a rigid “support and resistance box.” It is meant to help you frame location. In general, long ideas have better location when price is in discount or reclaiming the midpoint with momentum, and short ideas have better location when price is in premium or rejecting the midpoint from below. This becomes especially powerful when combined with your other tools, because a bullish displacement and FVG that forms in discount and then holds the reload zone tends to have much better continuation odds than the same pattern forming at the very top of premium into overhead liquidity.
CISD in this indicator is your liquidity-sweep and directional-shift engine, designed to answer a very specific question, did price just take liquidity and then flip orderflow enough to justify a new directional bias. The script first maps swing liquidity using pivot highs and pivot lows over your selected swing period, then tracks when those levels are wicked or mitigated within an expiry window. When a swing high or swing low is taken, the CISD logic watches for the characteristic shift pattern that follows, and when it qualifies it prints a CISD level and establishes a trend state. The “Noise Filter” setting controls how strict the CISD trigger is, higher values reduce noise and produce fewer but more meaningful CISDs, while lower values produce more signals but may include weaker shifts. The indicator also distinguishes between a normal CISD and a stronger CISD that occurs after opposing liquidity was recently wicked within your liquidity lookback, and those stronger events are marked with the directional ▲/▼ symbols so you can immediately recognize when a sweep-and-shift sequence likely occurred instead of a random flip.
A key feature you asked for, and that this indicator includes, is that CISD levels can extend in a very controlled way so you can keep trading them without guessing where the level “ends.” The current timeframe CISD lines are drawn at the origin level and then the script can extend only the most recent X CISD lines out past the current bar by a user-defined number of bars, without creating gaps or redrawing incorrectly. This means your newest CISD levels remain visually “live” and tradable into the immediate future, while older CISDs automatically restore to their original endpoints and behave normally. This is important for execution because it keeps the focus on the levels that are most likely to matter now, while still preserving history without clutter.
The MTF CISD add-on is what gives you institutional alignment, because it allows a higher timeframe CISD to print onto your execution timeframe. The script computes CISD on the selected HTF using request.security and then draws HTF CISD lines on your chart in real time. You can choose “Confirmed HTF only,” which means the HTF CISD only prints when the higher timeframe candle closes, or you can turn confirmation off to see developing HTF CISDs while the HTF candle is still building. The HTF line style is configurable, and the HTF lines can extend to the right so they behave like real mapped levels. The HTF label is also supported and can be pinned to the right edge with an x-offset, so you always know which timeframe the CISD came from without having to guess. Optional HTF markers can print ▲/▼ on the bar where a new HTF CISD event is detected, which gives you a fast “regime shift” alert that pairs extremely well with your displacement and FVG tools.
CISD also includes a candle coloring option so you can visually trade the bias without constantly reading every label. You can keep candle coloring off, turn on an overlay candle layer using plot candle, or use bar color to recolor the native chart candles. The trend that drives candle color can be the current timeframe CISD trend or, if enabled, the HTF CISD trend so your execution timeframe candles reflect the higher timeframe shift. In the combined script, displacement bar coloring still has priority if you leave it enabled, meaning displacement bars will show your displacement color choice first, and the CISD candle coloring will apply where displacement is not overriding. That’s intentional, because displacement bars are “event bars,” while CISD coloring is “state,” and you want to see both without confusion.
In terms of how to use CISD with the rest of this indicator, the cleanest institutional workflow is to treat CISD as the directional context and trigger, and use displacement, FVG, and Reload Zones as the execution framework. A fresh HTF CISD is your “macro shift” that tells you which side is likely building control, then you wait for displacement on your execution timeframe that agrees with that bias and produces an FVG. The Reload Zone becomes your location for entry on the retrace, BOS/CHOCH tells you if structure is truly transitioning or continuing, and your invalidation stays anchored to the far edge of the FVG or the CISD level depending on which is tighter and more structurally meaningful. When CISD and displacement disagree, that’s usually a “stand down or reduce size” condition unless you’re explicitly trading a reversal, because it often means the market is still in rotation or repairing imbalance rather than trending cleanly.
The BOS and CHOCH tool is the structure confirmation layer. The indicator finds swing highs and swing lows using a pivot-based swing length and then plots structure lines at those pivots. Breaks are detected either by close or by wick, based on your setting. BOS, Break of Structure, signals continuation in the current structural regime, while CHOCH, Change of Character, signals a likely regime change. The indicator uses a simple internal state to differentiate BOS from CHOCH, so you can read structure shifts in real time rather than labeling everything as a generic “break.” You can display structure as lines, labels, or both. The lines extend until price breaks them, then they stop at the break so you can visually see exactly where the market transitioned. This module is especially useful for keeping you out of the trap of assuming a pullback is a reversal. If you see displacement and FVGs but no structural confirmation, you can reduce size or wait. If you see a CHOCH that aligns with a displacement shift and then price returns to a reload zone, you have a much higher quality reversal framework.
When you put these tools together, the intended trading workflow becomes a complete narrative. First you identify meaningful movement through displacement, and if you use the structure filter you ensure it is not just a large candle but a break in the auction. That displacement then creates an FVG, the inefficiency left behind by repricing. The Reload Zone marks the most tradable retest area of that inefficiency, and the invalidation line gives you a clear risk boundary. The Dealing Range tells you whether you are taking that setup from a favorable location, discount for longs or premium for shorts. BOS and CHOCH provide the final confirmation layer that tells you whether you are trading continuation or a genuine structural shift. This structure keeps you from chasing breakouts, because it naturally trains you to wait for the pullback into the reload zone and to only participate when price proves acceptance and rejection behavior at the level.
This indicator is built to be flexible. You can run it as a clean displacement plus imbalance tool by focusing on displacement, FVGs, and reload zones, or you can turn it into a full context-and-confirmation system by adding dealing range and BOS/CHOCH. If you want a high-signal, low-noise chart, keep the structure break requirement on, use close-based breaks, limit the number of active gaps, and hide mitigated gaps. If you want more sensitivity and earlier signals, use wick-based breaks and allow more gaps to remain visible. The goal is always the same, to help you see when the market is actually repricing, to mark the price areas where that repricing left unfinished business, and to give you a consistent way to execute retests with defined risk and clear structural context. Indicateur

Institutional Confluence Nexus [Pro]The Problem: Noise vs. Signal
In the world of Smart Money Concepts (SMC), traders are often overwhelmed by "chart clutter." Standard indicators blindly highlight every Fair Value Gap (FVG) and Order Block (OB), regardless of whether the market is trending, ranging, or dead. This leads to analysis paralysis and low-probability entries.
The Institutional Confluence Nexus was built to solve this. It is not just a structure detector; it is a filtering engine. It uses a multi-factor model to hide low-probability zones and only highlight setups where Structure, Volume, and Momentum align.
The "Quantum" Integration
This script includes a built-in Quantum Regression Oscillator (QRO) engine running in the background. Unlike standard RSI or MACD which are reactive (lagging), the QRO uses Linear Regression mathematics to project momentum trajectory.
By combining institutional structure (Price Action) with quantum momentum (Math), this tool generates specific high-probability signals that only appear when price action and momentum are in perfect agreement.
How It Works & Visual Guide
This indicator is a complete trading suite. Here is what every symbol and color on your chart represents:
1. The "Nexus" Reversal Signals (Triangles)
Symbol : Green Triangle (Up) / Red Triangle (Down) labeled NEXUS.
Logic : These appear when price taps a valid Order Block that aligns with the macro trend (200 EMA).
Meaning : These are your primary "Trend Join" setups. They indicate that the institutional trend is resuming after a retracement.
2. High-Volume Breakouts (Bar Colors)
Symbol : Yellow Candles (Bullish) / Orange Candles (Bearish).
Logic : The script detects when a Break of Structure (BOS) occurs with Above-Average Volume.
Meaning : A breakout without volume is often a fakeout. These colored bars confirm that institutions are fueling the move. If you see a Yellow bar, it means "Smart Money" is buying the breakout.
3. QRO Confluence Signals (Labels)
These are the most advanced signals in the suite, combining Price Action with the internal Oscillator:
SNIPER (Blue/Purple) : The strongest reversal signal.
Condition : Price taps a Fair Value Gap + The internal QRO is at extreme volatility bands (Oversold/Overbought).
PB BUY / PB SELL (Aqua/Orange) : A trend continuation signal.
Condition : Price pulls back into a Fair Value Gap + The internal QRO confirms momentum is still healthy (above/below midline).
Note : These signals automatically draw a Red Line at the invalidation point (Stop Loss) to help you manage risk immediately.
4. The Confluence Dashboard
A non-intrusive Heads-Up Display (HUD) in the corner gives you a snapshot of the market state:
Trend : Is price above/below the 200 EMA?
Volume : Is current volume anomalous (High) or normal?
Structure : Are we breaking up, down, or ranging?
Settings & Customization
Smart Money Structure: Toggle FVGs and Order Blocks on/off.
FVG Extend: Control how far the gap "zones" extend to the right to see them as support/resistance zones.
Volume Filter: Enable/Disable the volume requirement (Keep enabled for higher strike rate).
Risk Management: Adjust the "Lookback" period for the automatic Stop Loss lines.
For Developers (Open Source)
I have kept the code open-source to foster learning in the Pine Script community. You can study how:
ta.linreg is used to smooth RSI data for the internal QRO engine.
box.new and line.new are used for dynamic drawing and extending zones.
var variables are used to store historical FVG levels to detect precise crossovers.
Disclaimer:
This tool is designed to assist with technical analysis and educational purposes. It does not guarantee profits. Always manage your risk and use this in conjunction with your own analysis. Indicateur

Range Indicator Golden Pocket, Liquidity, FairValueGapOverview
This indicator is a comprehensive institutional market structure toolkit. It is designed to identify high-probability reversal zones by merging three powerful technical analysis concepts: Fibonacci Golden Pockets (61.8% - 65%), Liquidity Pool Analysis (Swing Failure Patterns), and Fair Value Gaps (FVG). By automating the detection of price inefficiencies and "stop runs," it helps traders navigate complex price action with objective, rule-based confirmation.
What the Script Does
The script continuously monitors a user-defined lookback period to define a trading range. Within this range, it dynamically plots:
Golden Pockets: High-confluence retracement zones (calculated as 0.35 - 0.382 internal range levels).
Liquidity Zones: Highlighted regions at the absolute high and low (Top/Bottom 5%) where institutional orders and retail stops are typically concentrated.
Swing Failure Patterns (SFP): Real-time detection of liquidity grabs where price breaches a range extreme but fails to close outside, signaling a potential trap.
Fair Value Gaps (FVG): Visualizes 3-candle price imbalances, showing areas of aggressive buying or selling that often act as future magnets or support/resistance.
2-Candle Confirmation: A momentum-based filter requiring a candle-close confirmation before a reversal signal is generated.
For Whom is it?
Smart Money Concepts (SMC) & ICT Students: Traders looking for automated liquidity sweeps and market inefficiencies.
Fibonacci & Mean Reversion Traders: Those seeking a clean, professional visualization of the Golden Pocket across multiple timeframes.
Systematic Day Traders: Who require strict price-action confirmation (SFP and 2-candle rules) to remove emotional bias from their entries.
Functions and Input Options
1. Market Structure & Visuals
Lookback Period (Default: 100): Defines the window for calculating the range extremes.
Box Offset Right (Default: 50): Extends all zones into the future for better anticipatory trading.
Show Price Lines & Labels: Displays the exact price for every zone boundary on the right axis for precise execution.
2. Fair Value Gap (FVG) Settings
Show Fair Value Gaps: A toggle to enable/disable the plotting of price imbalances.
FVG Extension (Default: 10): Determines how many bars into the future the FVG box remains visible.
Custom Colors: Separate color inputs for Bullish (Gap Up) and Bearish (Gap Down) inefficiencies.
3. Professional Alert System
The script includes five specific alert conditions:
GP Touch: Early warning when price enters a Golden Pocket.
2-Candle Pattern: Confirmed momentum shift within a Golden Pocket.
SFP Long/Short: Alerts when a Liquidity Grab (Swing Failure) is confirmed at the range high or low.
Transparency and Compliance (Moderator Info)
Non-Repainting Logic: All signals (SFP, 2-Candle, and FVG) are calculated and triggered based on confirmed candle closes. Drawings use barstate.islast purely for visual efficiency without altering historical data integrity.
Educational Context: The script visualizes well-known market principles (Fibonacci, SFPs, and FVGs) to aid traders in their analysis; it does not provide automated financial advice or "black-box" buy/sell signals.
Resource Management: Optimized for Pine Script v5, using efficient array and box handling to ensure smooth performance even on lower timeframes. Indicateur

Smart Gap Concepts [MarkitTick]💡 This indicator automates the identification and classification of price gaps, commonly known as Fair Value Gaps (FVG) or Imbalances, by integrating market structure and volume analysis. Unlike standard gap detectors that simply highlight empty space on a chart, this script applies algorithmic filters to categorize gaps into three distinct phases of market movement: Breakaway, Runaway, and Exhaustion. This helps traders understand the potential context of a move rather than just seeing a support or resistance zone.
● Originality and Utility
The primary innovation of this tool is its dynamic classification system. It moves beyond visual detection by checking the "why" behind the gap. By referencing Swing Highs and Swing Lows (Market Structure) alongside Volume efficiency, it determines if a gap represents a breakout, a trend continuation, or a climatic end to a move. Additionally, the script features an automated mitigation tracking system that removes gaps from the chart once price has re-tested the midpoint, ensuring the visual workspace remains clean and relevant to current price action.
● Methodology
The script operates on a multi-stage logic engine:
• Gap Detection
It first identifies the core imbalance where the Low of the current bar does not overlap with the High of the bar two periods prior (for bullish gaps), ensuring the intervening candle represents a strong displacement.
• Structural Analysis (Breakaway Gaps)
The script monitors Pivot Highs and Lows. If a gap occurs simultaneously with a close beyond a key structural Pivot, it is classified as a "Breakaway Gap." This signals the potential start of a new trend.
• Volume and Time Analysis (Exhaustion Gaps)
To identify potential reversals, the script looks for "Trend Maturity." If a gap forms after a long duration since the last pivot and is accompanied by a volume spike (defined by the Volume Spike Multiplier), it is labeled as an "Exhaustion Gap."
• Continuation (Runaway Gaps)
If a gap is valid but meets neither the Breakaway nor Exhaustion criteria, it is considered a "Runaway Gap," typically found in the middle of an established trend.
• Dynamic Cleanup
The script tracks the midpoint of every active gap. If price creates a lower low (for bullish gaps) or higher high (for bearish gaps) beyond this midpoint, the gap is considered mitigated and is removed from the screen.
📖 How to Use
Traders can utilize the color-coded classifications to gauge market intent:
Breakaway (Default Blue): Watch these zones for potential trend initiations. These are often high-probability areas for a retest entry after a structure break.
Runaway (Default Orange): These indicate strong momentum. They can be used to trail stop-losses or add to winning positions, as price should ideally not close below these gaps in a healthy trend.
Exhaustion (Default Red): Be cautious when these appear. They suggest the current move is overextended and a reversal or complex pullback may be imminent.
• Exhaustion Gap : A Practical Case Study
• Breakaway Gap: A Practical Case Study
• Runaway Gap : A Practical Case Study
⚙️ Inputs and Settings
Min Gap Size (Points): Filters out insignificant gaps smaller than this threshold.
Structure Lookback: Defines the sensitivity of the Pivot detection (Swing High/Low).
Volume Avg Length & Multiplier: Determines what qualifies as a "Volume Spike" for exhaustion logic.
Trend Maturity: The minimum number of bars required to consider a trend "old" enough for an exhaustion signal.
Visual Settings: Custom colors for each gap type and box extension length.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Indicateur
