FairValueGap FVG

What is a Fair Value Gap or a Gap?
There may be different explanation or reasons of gaps In Forex, my knowledge says that gaps are not very common and they are filled when ever market gets an opportunity to fill. I am trying to figure out the fair Value gap through this indicator.
Gaps are sharp breaks in price with no trading occurring in between. Gaps can happen moving up or moving down. In the forex
market, gaps primarily occur over the weekend because it is the only time the forex market closes. Gaps may also occur on very
short timeframes such as a one-minute chart or immediately following a major news announcement.

How I calculated the gaps Value?

Calculation Method of Gap used is when (low_bar(current bar)-high_bar(two bars back))>0 and (low_bar(two bars back)-high_bar(current bar))>0
The gaps are represented by the Orange and Lime color Bar height.

Do the gaps need to be filtered?
This is the most important part according to me.
Yes, the gaps need to be filtered, Since there are may gaps one after another ,In This Indicator i have used a logic to filter out unnecessary Gaps.
you will be seeing only major Important gaps which you need to focus on.

How gaps Helps?
Gaps sometimes result in corrective price action. In other words, after the gap occurs prices have a tendency to reverse and “fill” the gap.
This is what is look for.

How to use the setting of the indicator and what do they represent?
This indicator setting has 4 options
1.plot major Filtered FVG of Bullish Candles
When you check this option all major FGV will be filtered based on my logic of filtering the gaps
2.plot major Filtered FVG of Bearish Candles
When you check this option all major FGV will be filtered based on my logic of filtering the gaps

3.Plot Bar size representing the GAPS
The bars(lime and orange color) in front of candle bars are the size of the gap.
4.Plot Lines representing the GAPS
You can also visualize the recent gaps through lines , you will be able to see only 3 to 5 recent gaps through line.(not able to plot
all gaps through line because of the limit, so gaps are represented by the orange and lime color bars)

You can also change the resolution in setting of the indicator to get different time frame FGV.

Thanks to mickey1984 for guiding and helping for this concept idea.
Have any question Feel free to ask?

An enthusiast trader. I code my strategies in pine script.DM me or Mail Me for any Info at
BTC : 1PZdTyH2faJn6XTyFK8C8uvS8zba2gCRmw
ETH : 0x0dF010AE708E424FD227f07538DeB24faa8B60e6
Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact Badshah.E.Alam for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Author's instructions

DM me or mail me for access. Have any question Feel free to ask.

Want to use this script on a chart?

Warning: please read before requesting access.