Fair Value Gap / FVG - HTF Orderflow bias / trend
Jun 26, 2021

The Fair Value Gap / FVG - HTF Orderflow bias / trend indicator provides a cumulative count of consecutive Fair Value Gaps to help traders identify the prevailing market bias and trend direction.
Usage
The tool is primarily used to identify orderflow bias by quantifying the momentum of Fair Value Gaps. When the counter is positive and plotted in green, it indicates a bullish bias characterized by successive bullish FVGs. Conversely, a negative counter plotted in red indicates a bearish bias.
Traders can use this script on Higher Timeframes (HTF), such as 1W or 1D, to establish a macro directional bias. This bias can then be used to filter trades on Lower Timeframes (LTF), such as 4H or 1H, ensuring that entries align with the higher-level orderflow. The counter resets to zero and flips its sign whenever the FVG direction reverses, signaling a potential shift in market trend.
Details
The script monitors price action to detect Fair Value Gaps based on the relationship between the current close and the previous bar's high or low.
- Bullish FVG: Triggered when the current close is greater than the previous high.
- Bearish FVG: Triggered when the current close is less than the previous low.
The calculation logic maintains a fvgCounter variable. If a bullish FVG occurs while the trend was previously bearish (negative counter), the counter resets to zero before incrementing. The same logic applies to bearish FVGs occurring during a bullish trend. This ensures the indicator clearly displays the strength of the current "run" of gaps.
Settings
- FVG Counter Color: The indicator uses specific colors (defaulting to green for bullish and red for bearish) to visualize the trend strength and direction.
- Alerts: The script includes built-in alert conditions that trigger when the FVG Trend flips from bullish to bearish or vice-versa.
FAQ
How do I interpret the FVG Counter value?
The absolute value of the counter represents the number of consecutive gaps in the current direction. A higher absolute value indicates a more established and stronger trend.
What timeframes work best with this tool?
While it can be used on any timeframe, it is most effective on Higher Timeframes (Daily/Weekly) to establish a "North Star" bias for your trading strategy.
How can I access the Fair Value Gap / FVG - HTF Orderflow bias / trend?
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.