indicator · on price · open source
Fair Value Gap (Bullish)
Running…
Loading chart…
About
Bullish Fair Value Gap — a 3-candle pattern where the wick of bar[2] sits above the wick of bar[0] with no overlap, leaving an imbalance institutions tend to revisit.
- Green zone = top of bar[2] high to bottom of bar[0] low.
- Optional
minGapPctfilter ignores tiny gaps (in % of price). - Pairs with a discount filter for long entries.
Source code
//@version=5
indicator("Fair Value Gap (Bullish)", overlay=true)
minGapPct = input.float(0.1, "Min Gap %", minval=0, maxval=5, step=0.05)
extendBars = input.int(30, "Extend Bars", minval=5, maxval=200)
gapBull = low[0] > high[2]
gapPct = (low[0] - high[2]) / close * 100
gapBull := gapBull and gapPct >= minGapPct
var float fvgBullTop = na
var float fvgBullBot = na
var int fvgBullAge = 9999
if gapBull
fvgBullTop := low[0]
fvgBullBot := high[2]
fvgBullAge := 0
fvgBullAge += 1
if fvgBullAge > extendBars
fvgBullTop := na
fvgBullBot := na
p_Bull_FVG_Top = plot(fvgBullTop, "Bull FVG Top", color=color.green, style=plot.style_linebr)
p_Bull_FVG_Bot = plot(fvgBullBot, "Bull FVG Bot", color=color.green, style=plot.style_linebr)
fill(p_Bull_FVG_Top, p_Bull_FVG_Bot, color=color.new(color.green, 88))
alertcondition(gapBull, "Bullish FVG", "Bullish fair value gap printed")
No comments yet.
Sign in to comment.