ORB + New High/Low Alerts

459
ORB + Trail Exit Alerts (v2)

Opening-range breakout alerts with a hold-through confirmation filter and a matching trail-exit signal — built to solve one specific problem: most ORB alerts fire on the very first candle that pokes past the range, which is often the chasing entry, not the real signal.

How it works

Opening range — tracks the high/low of the first N minutes of the regular session (default 15m, configurable to 5/15/30).
Confirm timeframe — once the range is set, the script watches candle closes on a separate confirm timeframe (default 5m) rather than the chart's own timeframe. This keeps the signal consistent regardless of what resolution you're currently viewing.
Hold-through filter — a single close beyond the range is not enough. The script requires N consecutive confirm-timeframe closes beyond the level (default 2) before alerting. A close that fails back inside the range resets the count to zero. This filters the single-bar fakeouts that a naive "close beyond the range" alert fires on.
Trail-exit alert — once an ORB alert has fired, the script tracks an EMA (default length 5) computed on the same confirm-timeframe closes, and fires a second alert the first time price closes back across it. This gives a defined, non-discretionary exit signal instead of leaving the trail decision to be made under pressure mid-trade.
New-high pings — optional supplementary alerts for fresh 5m/15m highs, pause-filtered so a steady trend doesn't spam an alert on every bar.
Setup

All alert conditions use alert() calls — create a TradingView Alert on this indicator with condition "Any alert() function call" to receive them. Inputs let you switch between "close" mode (filters wick fakeouts, recommended) and "touch" mode (fires on any wick through, no confirmation), adjust the opening-range length, confirm timeframe, required confirm bars, and trail EMA length.

Notes

This is a signal/alert tool, not a strategy backtest — it does not place trades or account for slippage, commissions, or position sizing. Alerts mark when the rule conditions are met; whether and how to act on them is a discretionary decision. Past price action shown by the indicator is not indicative of future results.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.