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 abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad