Adding indicator, named "FVG by Sirius", a custom tool developed in Pine Script for the TradingView platform. It is designed to detect, visualize, and manage Fair Value Gaps (FVGs) on financial charts. Below is a detailed description:
Features and Functionality
Fair Value Gap (FVG) Detection:
Identifies both bullish and bearish FVGs by analyzing gaps in price movement between consecutive candles.
Includes options to detect FVGs on both the primary timeframe and a secondary timeframe (user-configurable).
Visualization:
Displays FVGs directly on the chart using boxes and lines with customizable properties such as color, transparency, and border styles.
Highlights the 50% level of each FVG, often used as a reference for potential price reactions.
Customization Options:
FVG Length: Defines the horizontal extension of the FVG.
Prolongation: Allows FVGs to extend further until a user-defined point or remain static.
Removal of Filled FVGs: Automatically deletes FVGs once the price fills them.
Colors and Styles: Separate customization for bullish and bearish FVGs, including transparency, text labels, border styles, and thickness.
Text Labels: Configurable text descriptions for each FVG with options for alignment, size, and color.
Secondary Timeframe Support:
Enables the detection of FVGs on a secondary timeframe (e.g., M5, H1) in addition to the primary chart's timeframe.
Independent customization for secondary timeframe FVGs.
Dynamic Adjustment:
Automatically updates FVG visualization as new bars are added.
Adjusts the box and line lengths based on user-specified settings.
Robust Limitations:
Supports up to 500 lines, labels, and boxes on the chart.
Handles extensive backtesting with a maximum of 5000 bars.
Use Case
The indicator is ideal for traders who incorporate Fair Value Gaps into their technical analysis, especially in strategies involving price imbalances or supply and demand zones. The flexibility in customization ensures it suits various trading styles and preferences.
How It Works
Bullish FVG: A gap is identified when the low of the next candle is higher than the high of the previous candle.
Bearish FVG: A gap is identified when the high of the next candle is lower than the low of the previous candle.
Once an FVG is detected:
A box is drawn to represent the gap area.
A line is drawn at the 50% level of the gap.
Text labels are added based on user preferences.
If a filled FVG is detected (price revisits the gap area), the visualization can be removed based on settings.
Customization Parameters
Primary Timeframe FVGs: Full control over colors, borders, labels, and line styles.
Secondary Timeframe FVGs: Independent configuration for an additional timeframe.
Dynamic Display: Adjustable behavior for extending or deleting FVGs.
This tool provides traders with a comprehensive, visual approach to monitor and analyze Fair Value Gaps in real-time and historical data.