OPEN-SOURCE SCRIPT

FVG Channel [LuxAlgo]

The FVG Channel indicator displays a channel constructed from the averages of unmitigated historical fair value gaps (FVG), allowing to identify trends and potential reversals in the market.

Users can control the amount of FVGs to consider for the calculation of the channels, as well as their degree of smoothness through user settings.

🔶 USAGE

ảnh chụp nhanh

The FVG Channel is constructed by averaging together recent unmitigated Bullish FVGs (contributing to the creation of the upper bands), and Bearish unmitigated FVGs (contributing to the creation of the lower bands) within a lookback determined by the user. A higher lookback will return longer-term indications from the indicator.

The channel includes 5 bands, with one upper and one lower outer extremities, as well as an inner series of values determined using the Fibonacci ratios (respectively 0.786, 0.5, 0.236) from the channel's outer extremities.

An uptrend can be identified by price holding above the inner upper band (obtained from the 0.786 ratio), this band can also provide occasional support when the price retraces to it while in an uptrend.

Breaking below the inner upper band with an unwillingness to reach above again is a clear sign of hesitation in the market and can be indicative of an upcoming consolidation or reversal.

This can directly be applied to downtrends as well, below are examples displaying both scenarios.

Uptrend Example:

ảnh chụp nhanh

Downtrend Example:

ảnh chụp nhanh

🔹 Breakout Levels

ảnh chụp nhanh

When the price mitigates all FVGs in a single direction except for 1, the indicator will display a "Breakout Level". This is the level that price will need to cross in order for all FVGs in that direction to be mitigated, because of this they can also be aptly called "Last Stand Levels".

These levels can be considered as potential support and resistance levels, however, should always be monitored for breakouts since a substantial push above or below these points would indicate strong momentum.

🔹 Signals

ảnh chụp nhanh

The indicator includes Bullish and Bearish Signals, these signals fire when all FVGs for a single direction have been mitigated and an engulfing candle occurs in the opposite direction. These are reversal signals and should be used alongside other indicators to appropriately manage risk.

Note: When all FVGs in a single direction have been mitigated, the candles will change colors accordingly.

🔶 DETAILS

The script uses a typical identification method for FVGs. Once identified, the script collects and stores the mitigation levels of the respective bullish and bearish FVGs:

  • For Bullish FVGs this is the bottom of the FVG.
  • For Bearish FVGs this is the top of the FVG.


The data is managed to only consider a specific amount of FVG mitigation levels, determined by the set "Unmitigated FVG Lookback". If an FVG is mitigated, it frees up a spot in the memory for a new FVG, however, if the memory is full, the oldest will be deleted.

The averages displayed (Channel Upper and Lower) are created from 2 calculation steps, the first step involves taking the raw average of the FVG mitigation levels, and the second step applies a simple moving average (SMA) smoothing of the precedent obtained averages.

Note: To view the mitigation levels average obtained in the first step, the "Smoothing Length" can be set to 1.

ảnh chụp nhanh

🔶 SETTINGS

  • Unmitigated FVG Lookback: Sets the maximum number of Unmitigated FVG mitigation levels that the script will use to calculate the channel.
  • Smoothing Length: Sets the smoothing length for the channel to reduce noise from the raw data.
bandsChart patternsEnvelope (ENV)fvgluxalgoParallel ChannelpriceactionreversalsignalsTrend Analysis

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm