Purpose: It calculates and displays bullish and bearish order blocks, key levels derived from recent price movements, which traders use to identify potential support and resistance areas.
Inputs: Users can customize the order block length, defining the range of price data used for calculations.
Logic: The script uses ta.lowest and ta.highest functions to compute order blocks based on specified periods for bullish and bearish trends.
Additional Levels: It identifies extra order blocks (bullish_below and bearish_above) to provide more context for deeper support or higher resistance.
Price Table: A visual table is created on the chart, showing the current price, bullish and bearish order blocks, and additional bearish levels above the current price.
Alerts: Alerts are triggered when the price crosses key order block levels, helping traders react to significant price movements.
Flexibility: The table dynamically updates based on the chart’s ticker and timeframe, ensuring it always reflects the latest data.
Bearish Above Price: Highlights the most recent bearish order block above the current price to inform traders about potential resistance areas.
Visualization: The clear table format aids quick decision-making by summarizing key levels in an accessible way.
Usability: This script is especially useful for intraday and swing traders seeking to integrate order block analysis into their strategies.