STATUS: IN DEVELOPMENTPINE + MQL5 SOURCE: PROVIDED, NOT YET TESTED ON A PLATFORMRELEASED: NONE

Home / TradingView

TradingView

FVG indicator for TradingView

The TradingView version is a Pine Script v6 source file. It is on this site to read. It is not in TradingView's script library.

Source provided, not yet tested on a platform. Nobody has compiled or run this code on TradingView or in MetaTrader 5. It was written to follow the rule on this site line by line, and a test in this repository checks its inputs and its comparisons as text. That is not the same as running it. Do not trade on it before you have tested it yourself on a demo or on history.

Status

Source provided The file indicator/fvg.pine, shown in full.

Planned A listing in TradingView's script library. Its house rules about links have not been checked, and nothing has been submitted.

Planned A tested release, with a repaint test report.

How you would add it

  1. Open the Pine Editor in TradingView.
  2. Replace the editor's content with the file's text and save it.
  3. Add it to the chart and open its settings.

If the editor reports an error, the file needs a fix. It has never been compiled. The inputs are on the settings page.

What it draws

A shaded box for every three-candle gap, from candle 1 to candle 3, extended to the right until a later bar trades through the far edge. It draws only when a bar closes. What a gap is and how educators use the term is covered in this guide to the pattern.

Alerts

The file defines two alert conditions, one for a new bullish and one for a new bearish gap. Their behaviour is described on the alerts page. They are untested.

Other tools

Not on TradingView? Use the browser detector, or read about MetaTrader 5.