Three Bar Gap (Simple Price Action - with 1 line plot)
Feb 7, 2023

The Three Bar Gap (Simple Price Action - with 1 line plot) indicator identifies "Fair Value Gaps" or price imbalances using a three-bar pattern to help traders visualize key institutional activity with minimal chart clutter.
Usage
The Usage section describes how the script can be used to identify areas of market inefficiency. When the script detects a significant displacement in price over three consecutive candles, it plots a single horizontal line representing the midpoint of that gap.
- Trend Following: Traders can use the gap direction as a momentum signal. Entering positions above or below the initial impulse with stop-limit orders is a common tactic.
- Mean Reversion/Contrarian: The plotted midpoint serves as a significant reference level. If price returns to this "imbalance" zone, the midpoint often acts as a potential area of support or resistance.
- Minimalist Analysis: Because the indicator uses a single line plot rather than bulky boxes, it is ideal for price action traders who prefer a "clean" chart for live execution.
Details
The script calculates the displacement between the high/low of the current bar and the low/high of the bar from two periods ago.
- Bullish Gap: Occurs when the Low of the current bar is higher than the High of the candle from two periods ago.
- Bearish Gap: Occurs when the High of the current bar is lower than the Low of the candle from two periods ago.
Conceptually, these gaps represent "time-perception" imbalances where price moves so quickly that liquidity is sparsely dispersed within the middle candle. To ensure only significant moves are highlighted, the script implements an ATR-based volatility filter.
Settings
Threshold
- ATR: The lookback period for the Average True Range used to calculate the volatility threshold.
- x (Multiplier): A multiplier applied to the ATR value. A higher multiplier reduces the number of detected gaps (filtering for higher significance), while a lower multiplier shows more frequent, smaller gaps.
Plots
- Colors for Up move / Down move: Customizable color selection for bullish and bearish gap midpoints.
- Width of the line: Adjusts the thickness of the horizontal plot on the chart.
FAQ
How do I use the ATR multiplier effectively?
If your chart is too noisy with too many lines, increase the multiplier (e.g., to 1.0). If you are trading a highly trending market and want to see more frequent imbalances, decrease the multiplier (e.g., to 0.2).
Does this indicator repaint?
No. The script evaluates the pattern based on confirmed bar closes, ensuring that the detected gaps and their midpoints remain fixed once the bar is completed.
How can I access the Three Bar Gap (Simple Price Action - with 1 line plot) tool?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.