OPEN-SOURCE SCRIPT
FVG Zones with Signals

█ OVERVIEW
"FVG Zones with Signals" is a technical analysis tool that identifies Fair Value Gaps (FVG) on the chart and draws customizable zones in the form of boxes. It is ideal for traders using price action and market structure strategies, helping to identify potential imbalance zones and trading opportunities based on breakout and exit signals. With flexible size filter settings, box styles, and signal options, the indicator ensures clarity and precision on the chart.
█ CONCEPTS
The indicator is designed to identify potential entry points for trades based on FVG breakouts or retests. For chart clarity, a size filter for FVGs is included, based on a multiplier of the average candle size over a specified period.
Why are FVGs important? FVG zones represent areas of market imbalance, often attracting price back to "fill" the gap. Larger gaps (with a higher size multiplier) have a greater chance of being retested, as they indicate deeper imbalances—leaving more unexecuted orders in those zones, which attracts liquidity. Market makers and institutions often return to these levels to "refresh" liquidity before further moves. However, not every large FVG is retested quickly—in strong trends, smaller imbalances may be ignored, and the location (e.g., near swing highs/lows) is critical for retest probability.
█ FEATURES
- FVG Detection: Identifies bullish and bearish FVGs based on size filters (Candle Size Period and FVG Size Multiplier), with automatic initialization of historical gaps up to 500 candles back.
- Customizable Boxes: Draws FVG boxes with adjustable border colors, background gradients, border styles (solid, dashed, dotted), border widths, and transparency for both the background and the 50% FVG midline.
- Breakout and Exit Signals: Generates "Break" signals (green upward triangle for breakouts above bearish FVG, red downward triangle for breakouts below bullish FVG) and "Exit" signals (circles for exiting the zone), with options to select signal types (Break, Exit, or Both). A break signal causes the box to disappear, leaving a triangle as a trace of the breakout, which may serve as a signal to open a position. Exit signals (circles) may also indicate entry opportunities but require additional confirmation, such as alignment with the main trend.
- Midline: Automatically draws a dashed line at the 50% FVG level with adjustable transparency, aiding in assessing price reactions within the zone.
- Box Limitation: Automatically removes old or inactive FVGs after 500 candles to avoid chart clutter.
- Alerts: Built-in alerts for all signal types, including price and FVG type descriptions.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- FVG Settings: Adjust Candle Size Period (default 20) and FVG Size Multiplier (default 1) to filter out small gaps—higher values generate fewer but more significant FVGs.
- Box Settings: Configure colors and styles for bullish (green) and bearish (red) boxes, including background transparency (default 80) and midline transparency.
- Signal Settings: Select signal types (Break, Exit, or Both) in Signal Type. Breakout signals appear after a candle closes outside the zone, while exit signals appear when exiting an FVG without a full breakout.
- Styling: Customize signal colors (green for buy/up, red for sell/down) and shape sizes.
Interpreting Signals:
- Break Up Signal: A green triangle below the bar indicates a breakout above a bearish FVG, suggesting potential continuation of an uptrend.
- Break Down Signal: A red triangle above the bar indicates a breakout below a bullish FVG, suggesting potential continuation of a downtrend.
- Exit Up/Down Signal: A green/red circle indicates an exit from an FVG without a full breakout, which may signal the end of a correction or preparation for a reversal.
- FVG Zones: If the price returns to an FVG and fills the gap, it may indicate equilibrium; an unfilled gap often leads to a retest.
- Use signals in conjunction with other technical analysis tools for confirmation, such as RSI (to identify overbought/oversold conditions) or MACD (to confirm momentum). Analyze FVGs from higher timeframes—these zones act as stronger imbalance levels and carry greater structural significance.

Exit signals (retests without breakouts) tend to be most effective when traded in line with the current trend.
█ APPLICATIONS
- Price Action Trading: Use FVG zones as dynamic support and resistance levels. In an uptrend, look for buying opportunities in bullish FVGs, where price often tests the gap before continuing. Combining with RSI, MACD, or Fibonacci levels enhances the significance of zones.
- Breakout Strategies: Trade based on breakout signals from FVGs. A buy signal after breaking a bearish FVG may indicate a strong upward impulse, especially when supported by a rising MACD or RSI exiting oversold conditions.
Larger FVG gaps (higher multiplier) have a greater chance of retest, as they indicate deeper imbalances.
█ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize size filters for your trading style.
- The indicator initializes historical FVGs up to 500 candles back, which may slow loading on longer charts.
- For best results, use on high-liquidity markets where FVGs are more frequently retested.
- In consolidation zones, the indicator may generate more false signals, so additional confirmation is recommended.
"FVG Zones with Signals" is a technical analysis tool that identifies Fair Value Gaps (FVG) on the chart and draws customizable zones in the form of boxes. It is ideal for traders using price action and market structure strategies, helping to identify potential imbalance zones and trading opportunities based on breakout and exit signals. With flexible size filter settings, box styles, and signal options, the indicator ensures clarity and precision on the chart.
█ CONCEPTS
The indicator is designed to identify potential entry points for trades based on FVG breakouts or retests. For chart clarity, a size filter for FVGs is included, based on a multiplier of the average candle size over a specified period.
Why are FVGs important? FVG zones represent areas of market imbalance, often attracting price back to "fill" the gap. Larger gaps (with a higher size multiplier) have a greater chance of being retested, as they indicate deeper imbalances—leaving more unexecuted orders in those zones, which attracts liquidity. Market makers and institutions often return to these levels to "refresh" liquidity before further moves. However, not every large FVG is retested quickly—in strong trends, smaller imbalances may be ignored, and the location (e.g., near swing highs/lows) is critical for retest probability.
█ FEATURES
- FVG Detection: Identifies bullish and bearish FVGs based on size filters (Candle Size Period and FVG Size Multiplier), with automatic initialization of historical gaps up to 500 candles back.
- Customizable Boxes: Draws FVG boxes with adjustable border colors, background gradients, border styles (solid, dashed, dotted), border widths, and transparency for both the background and the 50% FVG midline.
- Breakout and Exit Signals: Generates "Break" signals (green upward triangle for breakouts above bearish FVG, red downward triangle for breakouts below bullish FVG) and "Exit" signals (circles for exiting the zone), with options to select signal types (Break, Exit, or Both). A break signal causes the box to disappear, leaving a triangle as a trace of the breakout, which may serve as a signal to open a position. Exit signals (circles) may also indicate entry opportunities but require additional confirmation, such as alignment with the main trend.
- Midline: Automatically draws a dashed line at the 50% FVG level with adjustable transparency, aiding in assessing price reactions within the zone.
- Box Limitation: Automatically removes old or inactive FVGs after 500 candles to avoid chart clutter.
- Alerts: Built-in alerts for all signal types, including price and FVG type descriptions.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- FVG Settings: Adjust Candle Size Period (default 20) and FVG Size Multiplier (default 1) to filter out small gaps—higher values generate fewer but more significant FVGs.
- Box Settings: Configure colors and styles for bullish (green) and bearish (red) boxes, including background transparency (default 80) and midline transparency.
- Signal Settings: Select signal types (Break, Exit, or Both) in Signal Type. Breakout signals appear after a candle closes outside the zone, while exit signals appear when exiting an FVG without a full breakout.
- Styling: Customize signal colors (green for buy/up, red for sell/down) and shape sizes.
Interpreting Signals:
- Break Up Signal: A green triangle below the bar indicates a breakout above a bearish FVG, suggesting potential continuation of an uptrend.
- Break Down Signal: A red triangle above the bar indicates a breakout below a bullish FVG, suggesting potential continuation of a downtrend.
- Exit Up/Down Signal: A green/red circle indicates an exit from an FVG without a full breakout, which may signal the end of a correction or preparation for a reversal.
- FVG Zones: If the price returns to an FVG and fills the gap, it may indicate equilibrium; an unfilled gap often leads to a retest.
- Use signals in conjunction with other technical analysis tools for confirmation, such as RSI (to identify overbought/oversold conditions) or MACD (to confirm momentum). Analyze FVGs from higher timeframes—these zones act as stronger imbalance levels and carry greater structural significance.
Exit signals (retests without breakouts) tend to be most effective when traded in line with the current trend.
█ APPLICATIONS
- Price Action Trading: Use FVG zones as dynamic support and resistance levels. In an uptrend, look for buying opportunities in bullish FVGs, where price often tests the gap before continuing. Combining with RSI, MACD, or Fibonacci levels enhances the significance of zones.
- Breakout Strategies: Trade based on breakout signals from FVGs. A buy signal after breaking a bearish FVG may indicate a strong upward impulse, especially when supported by a rising MACD or RSI exiting oversold conditions.
Larger FVG gaps (higher multiplier) have a greater chance of retest, as they indicate deeper imbalances.
█ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize size filters for your trading style.
- The indicator initializes historical FVGs up to 500 candles back, which may slow loading on longer charts.
- For best results, use on high-liquidity markets where FVGs are more frequently retested.
- In consolidation zones, the indicator may generate more false signals, so additional confirmation is recommended.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.