OPEN-SOURCE SCRIPT
QQQ Bullish Order Block - July 2, 2025

//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)
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)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.