OPEN-SOURCE SCRIPT

Multi-Timeframe Block & Structure Break Analyzer (OB, BB & FVG)

Overview
First, a huge thanks to all the coders who have contributed open-source code on this platform. Their generosity has helped countless traders and developers, including myself, to learn and grow. In the same spirit, this indicator will also be open-source, giving back to the community that continues to inspire and educate.

This indicator is designed to identify and visualize market structure, order blocks, breaker blocks, and fair value gaps (FVGs) using swing points across multiple timeframes. By identifying key market turning points, such as higher highs (HH), higher lows (HL), lower highs (LH), and lower lows (LL), the indicator can highlight potential trading opportunities.

Features:

  1. Market Structure: Displays Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) based on user-defined swing points.
  2. Order Blocks: Identifies Bullish and Bearish order blocks, which represent areas of institutional interest.
  3. Breaker Blocks: Highlights zones where a failed order block leads to price continuation in the opposite direction.
  4. Fair Value Gaps (FVGs): Identifies imbalances in the price where inefficiencies occurred, signaling potential reversals or continuations.
  5. Multi-Timeframe Capability: Allows users to track market structure, order blocks, and FVGs from higher timeframes while trading on lower timeframes.

This indicator is designed to identify and visualize market structure, order blocks, breaker blocks, and fair value gaps (FVGs) using swing points across multiple timeframes. By identifying key market turning points, such as higher highs (HH), higher lows (HL), lower highs (LH), and lower lows (LL), the indicator can highlight potential trading opportunities.

Input Parameters
  1. Swing Point Sensitivity: Defines the number of bars used to determine a swing high or swing low. A higher value will consider more bars and highlight major swings, while a lower value will capture more frequent, smaller swings.
  2. Timeframes: Users can select specific timeframes for analysis, such as Daily, 4H, 1H, or custom timeframes.
  3. Market Structure Plot: Enable or disable the visualization of HH, HL, LH, and LL on the chart.
  4. Order Block Detection: Toggle order block detection on or off.
  5. Breaker Block Detection: Enable or disable the display of breaker blocks.
  6. Fair Value Gaps (FVGs): Toggle FVG detection on or off.
  7. Customization Options: Users can modify the color, line style, and label visibility for each feature (Market Structure, Order Blocks, Breaker Blocks, and FVGs).
  8. Alerts : Toggle on or off the use of alerts, once set, manually use the any alert function to trigger them.


Indicator Logic
  1. Swing Points:
    - Swing High: Defined as a price bar where its high is higher than a certain number of preceding and succeeding bars.
    - Swing Low: Defined as a price bar where its low is lower than a certain number of preceding and succeeding bars.
  2. Market Structure:
    - Higher High (HH): When the price creates a swing high above a previous swing high.
    - Higher Low (HL): When the price creates a swing low above a previous swing low.
    - Lower High (LH): When the price creates a swing high below a previous swing high.
    - Lower Low (LL): When the price creates a swing low below a previous swing low.
    - Structure is updated dynamically as new swing points are formed.
  3. Order Blocks:
    - **Bullish Order Block**: Identified as the **lowest point in price** following a bullish structure break, where price moves upwards significantly. This point serves as a zone of interest for potential future bullish reversals.
    - **Bearish Order Block**: Defined as the **highest point in price** after a bearish structure break, indicating an area where price might reverse downwards in the future.
  4. Breaker Blocks:
    - A failed order block, where price breaks in the opposite direction, invalidating the original block and indicating strong continuation momentum.
    - Breaker blocks are marked for potential retracement entries.
  5. Fair Value Gaps (FVGs):
    - Price inefficiencies are detected when price jumps from one level to another, leaving gaps between candles (usually between the high of one candle and the low of the next).
    - FVGs often signal areas where price is likely to return to "fill" the gap before continuing its move.
  6. Multi-Timeframe Analysis:
    - This indicator allows for the visualization of higher timeframe structures and blocks while analyzing lower timeframe charts.
  7. Users can select the higher timeframe from the input settings, allowing them to observe key levels (e.g., daily or weekly order blocks) on intraday charts like the 1-hour or 15-minute.


Conclusion

This multi-timeframe indicator serves as a comprehensive tool for traders looking to understand price action in terms of market structure and institutional trading zones. By utilizing swing points, order blocks, breaker blocks, and FVGs, traders can gain insights into price movements and make informed trading decisions.

**Disclaimer**: This indicator is a tool to aid in market analysis and is not intended as financial advice. Traders should use it in conjunction with their own research and risk management strategies. Always consult a financial professional before making any investment decisions.
multitimeframePivot points and levelsTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


更多:

免責聲明