PROTECTED SOURCE SCRIPT
OB+FVG

Indicator "OB + FVG"
Purpose:
This indicator identifies and visualizes important price zones called:
1. Order Blocks (OB): areas of accumulation or distribution, often preceding significant market
moves.
2. Fair Value Gaps (FVG): price imbalances created by fast movements, where the market
may return to "fill" the gap.
It works across multiple timeframes and shows both active and mitigated (already filled) zones.
How it works:
1. Detection of OB and FVG
- The script analyzes candlesticks to detect:
• Bullish (green) or bearish (red) price action.
• Where OB and FVG zones form between candles.
- Zones are stored with information like open, close, high, low, and midpoint.
2. Visualization
- Zones are displayed on the chart with:
• Colored rectangles: colors indicate bullish or bearish zones.
• Midlines: show the central level of the zone.
• Optional 25%-75% lines: highlight fractions of the zone.
• Labels: indicate timeframe and direction (↑ or ↓ for FVG).
3. Handling mitigated zones
- If price passes through a zone, the script can:
• Show it as mitigated in gray.
• Hide the zone completely based on user settings.
Main Inputs (Customizable by User):
- OB Options:
• Method to define OB (Close-to-H/L, Body, H/L).
• Show/hide lower timeframe OB to avoid clutter.
• Zone colors, borders, and midpoint line style.
• Labels: show timeframe, direction, color, size, background.
• Mitigation style: full body, half body, 75%, touched twice.
- FVG Options:
• Similar to OB, with separate colors and label options.
• Show only relevant FVG zones.
- Multi-Timeframe Support:
• Up to 6 timeframes for OB and FVG.
• Each timeframe has customizable visibility, colors, and max number of zones.
- Distance & Spacing:
• Distance from current price to avoid overlap.
• Timeframe zones offset slightly to prevent overlap.
What Users See on Chart:
- Colored rectangles for each OB or FVG (green/black for bullish, red/black for bearish).
- Optional midlines and 25%-75% fraction lines.
- Labels showing timeframe and direction.
- Mitigated zones can appear gray or hidden.
Summary:
This is an advanced tool for traders who want to visualize key price zones across multiple timeframes,
with full control over OB and FVG detection, multi-timeframe support, visual customization,
and automatic mitigation handling. Suitable for intraday and higher timeframe trading.
If you like my work, support me.
Disclaimer
This script is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. The author takes no responsibility for any losses or damages resulting from the use of this script. Trading involves risk, and you are solely responsible for your trading decisions.
Purpose:
This indicator identifies and visualizes important price zones called:
1. Order Blocks (OB): areas of accumulation or distribution, often preceding significant market
moves.
2. Fair Value Gaps (FVG): price imbalances created by fast movements, where the market
may return to "fill" the gap.
It works across multiple timeframes and shows both active and mitigated (already filled) zones.
How it works:
1. Detection of OB and FVG
- The script analyzes candlesticks to detect:
• Bullish (green) or bearish (red) price action.
• Where OB and FVG zones form between candles.
- Zones are stored with information like open, close, high, low, and midpoint.
2. Visualization
- Zones are displayed on the chart with:
• Colored rectangles: colors indicate bullish or bearish zones.
• Midlines: show the central level of the zone.
• Optional 25%-75% lines: highlight fractions of the zone.
• Labels: indicate timeframe and direction (↑ or ↓ for FVG).
3. Handling mitigated zones
- If price passes through a zone, the script can:
• Show it as mitigated in gray.
• Hide the zone completely based on user settings.
Main Inputs (Customizable by User):
- OB Options:
• Method to define OB (Close-to-H/L, Body, H/L).
• Show/hide lower timeframe OB to avoid clutter.
• Zone colors, borders, and midpoint line style.
• Labels: show timeframe, direction, color, size, background.
• Mitigation style: full body, half body, 75%, touched twice.
- FVG Options:
• Similar to OB, with separate colors and label options.
• Show only relevant FVG zones.
- Multi-Timeframe Support:
• Up to 6 timeframes for OB and FVG.
• Each timeframe has customizable visibility, colors, and max number of zones.
- Distance & Spacing:
• Distance from current price to avoid overlap.
• Timeframe zones offset slightly to prevent overlap.
What Users See on Chart:
- Colored rectangles for each OB or FVG (green/black for bullish, red/black for bearish).
- Optional midlines and 25%-75% fraction lines.
- Labels showing timeframe and direction.
- Mitigated zones can appear gray or hidden.
Summary:
This is an advanced tool for traders who want to visualize key price zones across multiple timeframes,
with full control over OB and FVG detection, multi-timeframe support, visual customization,
and automatic mitigation handling. Suitable for intraday and higher timeframe trading.
If you like my work, support me.
Disclaimer
This script is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. The author takes no responsibility for any losses or damages resulting from the use of this script. Trading involves risk, and you are solely responsible for your trading decisions.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。