OPEN-SOURCE SCRIPT

Fair Value Gap Detector

How this indicator works:
It detects two types of FVGs:

Bullish FVG: Occurs when the low of the current candle is higher than the high of the candle from 2 bars ago (creates an upward gap)

Bearish FVG: Occurs when the high of the current candle is lower than the low of the candle from 2 bars ago (creates a downward gap)

Features:
Allows users to toggle both bullish and bearish FVG detection independently
Customizable colors for both bullish (default green) and bearish (default red) FVGs

Visualizes FVGs using:
Boxes that highlight the gap area (with 80% transparency)
Labels that mark each FVG ("Bull FVG" or "Bear FVG")

Visual representation:
Bullish FVGs are marked with green boxes and downward-pointing labels
Bearish FVGs are marked with red boxes and upward-pointing labels

This indicator can be useful for:
Identifying potential areas where price might return to
Finding potential support and resistance zones
Understanding market structure and momentum shifts
Chart patternsHigh-Low IndexPine utilities

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal