OPEN-SOURCE SCRIPT

QQQ Bullish Order Block - July 2, 2025

93
//version=6
indicator("QQQ Bullish Order Block - July 2, 2025", overlay=true)

// Define the OB candle manually (July 2, 2025)
ob_date = timestamp("2025-07-02T00:00:00")

// Conditions: Bullish order block from last bearish candle before rally
is_ob_candle = time == ob_date

// Get OB candle open and close
ob_open = request.security(syminfo.tickerid, "D", open, lookahead=barmerge.lookahead_on)
ob_close = request.security(syminfo.tickerid, "D", close, lookahead=barmerge.lookahead_on)

// Use min/max to draw OB zone correctly (in case of red candle)
ob_high = math.max(ob_open, ob_close)
ob_low = math.min(ob_open, ob_close)

// Only show zone if price is at or above it (optional filter)
show_zone = close >= ob_high

// Draw the OB zone as a filled box
if is_ob_candle and show_zone
var box ob_box = box.new(left = bar_index, right = bar_index + 30, top = ob_high, bottom = ob_low,
border_color = color.green, bgcolor = color.new(color.green, 85))
box.set_extend(ob_box, extend = extend.right)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.