OPEN-SOURCE SCRIPT

FVG - Nibz

Description: Fair Value Gap (FVG) Indicator - Nibz
This Pine Script identifies and visualizes Fair Value Gaps (FVGs) on your TradingView chart. FVGs are price inefficiencies left behind when the market moves too quickly, skipping price levels that might not be tested. These gaps often act as magnets, attracting price for potential reversals or continuations.

The script works by detecting upward (bullish) and downward (bearish) price imbalances based on specific candlestick criteria and then marks these zones on your chart using customizable shaded boxes. This tool is essential for traders looking to identify key areas of market inefficiency that could signify support/resistance levels, potential reversal zones, or areas to monitor for market rebalancing.

How It Works
1. Bullish FVG Detection
The script identifies an upward imbalance when:
  • The low of the candlestick two bars back is less than or equal to the open of the previous bar.
  • The high of the current candlestick is greater than or equal to the close of the previous bar.
  • When this condition is met and the size of the imbalance is greater than zero, a green box is drawn from the low of the second candlestick back to the high of the current candlestick.


2. Bearish FVG Detection
The script identifies a downward imbalance when:
  • The high of the candlestick two bars back is greater than or equal to the open of the previous bar.
  • The low of the current candlestick is less than or equal to the close of the previous bar.
  • When this condition is met and the size of the imbalance is greater than zero, a red box is drawn from the low of the current candlestick to the high of the second candlestick back.


Customization Options
This script is highly customizable, allowing you to tailor the appearance of the FVG boxes to suit your trading style and chart aesthetics:

Bullish FVG:
Fill color and transparency.
Border color and transparency.
Bearish FVG:
Fill color and transparency.
Border color and transparency.

The settings are user-friendly, with intuitive sliders for transparency and color pickers for customization.

How to Use the Indicator
Adding the Script:
Add the indicator to your chart, and it will automatically mark bullish (green) and bearish (red) FVGs.

Interpreting FVGs:
Bullish FVGs (green zones): These often act as support or areas of potential price rebalancing on retracement.
Bearish FVGs (red zones): These often act as resistance or areas of interest for short entries.

Trade Ideas:
Use FVG zones to confirm other trade signals or strategies.
Watch for price interaction with these zones to time entries and exits.

Key Features
Automated detection of Fair Value Gaps.
Customizable visual representation to match your chart preferences.
Enhances trading precision by identifying price inefficiencies.
Suitable for scalping, day trading, or swing trading strategies.
This script provides a powerful tool to highlight important price levels and inefficiencies in the market, enabling traders to make informed decisions. Whether you're using it as a standalone indicator or combining it with other tools, the 'FVG - Nibz' indicator is a valuable addition to any trader's toolkit!
Candlestick analysisChart patterns

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer