OPEN-SOURCE SCRIPT
ORCB Opening Range Candle Break

ORCB — Opening Range Candle Break
The ORCB indicator is built around a simple but powerful concept: identify the high and low of a defined opening range, then trade the first clean break of that range in the direction of the trend.
How it works
The indicator defines an Opening Range between two user-set times (default 7:00–8:00 AM London time). It tracks the highest high and lowest low within that window, drawing a live shaded box as the range forms in real time. Once the range closes, it watches for the first candle to close cleanly above or below the range — confirmed only on closed candles, no repainting.
Signals are filtered by a dual EMA (default 8 & 20). Long signals only fire when the fast EMA is above the slow EMA. Short signals only fire when it is below. This keeps you trading with the trend and avoids counter-trend fades.
When a valid break occurs, the indicator plots an entry arrow, and automatically calculates and draws your Take Profit and Stop Loss levels based on your chosen Risk:Reward ratio (default 1:2). The SL is placed on the opposite side of the range plus a configurable buffer.
Features
Live OR box that forms in real time from the first candle of the range
OR High/Low lines shown for the current session only — historical days show the box only, keeping the chart clean
TP/SL lines for the current session only, automatically removed at midnight
Entry arrows kept permanently for trade review
Dual EMA trend filter with fully editable lengths and colours
Overnight High/Low (default 00:00–07:00) — mirrors Previous Day High/Low behaviour, visible all day and updated each morning
Previous Day High/Low — one set only, updated daily
All time windows, colours, buffer size, R:R ratio and EMA settings fully editable in Settings
Maximum OR box history configurable (default 10 days)
Built-in alerts for long and short breaks
Upgraded to Pine Script v6
Designed for
Index futures (DAX, ES, NQ) and forex on 5-minute and 15-minute charts. All session times use the Europe/London timezone, making it plug-and-play for London open strategies. All inputs are fully adjustable so it can be adapted to any session, instrument or opening range window.
The ORCB indicator is built around a simple but powerful concept: identify the high and low of a defined opening range, then trade the first clean break of that range in the direction of the trend.
How it works
The indicator defines an Opening Range between two user-set times (default 7:00–8:00 AM London time). It tracks the highest high and lowest low within that window, drawing a live shaded box as the range forms in real time. Once the range closes, it watches for the first candle to close cleanly above or below the range — confirmed only on closed candles, no repainting.
Signals are filtered by a dual EMA (default 8 & 20). Long signals only fire when the fast EMA is above the slow EMA. Short signals only fire when it is below. This keeps you trading with the trend and avoids counter-trend fades.
When a valid break occurs, the indicator plots an entry arrow, and automatically calculates and draws your Take Profit and Stop Loss levels based on your chosen Risk:Reward ratio (default 1:2). The SL is placed on the opposite side of the range plus a configurable buffer.
Features
Live OR box that forms in real time from the first candle of the range
OR High/Low lines shown for the current session only — historical days show the box only, keeping the chart clean
TP/SL lines for the current session only, automatically removed at midnight
Entry arrows kept permanently for trade review
Dual EMA trend filter with fully editable lengths and colours
Overnight High/Low (default 00:00–07:00) — mirrors Previous Day High/Low behaviour, visible all day and updated each morning
Previous Day High/Low — one set only, updated daily
All time windows, colours, buffer size, R:R ratio and EMA settings fully editable in Settings
Maximum OR box history configurable (default 10 days)
Built-in alerts for long and short breaks
Upgraded to Pine Script v6
Designed for
Index futures (DAX, ES, NQ) and forex on 5-minute and 15-minute charts. All session times use the Europe/London timezone, making it plug-and-play for London open strategies. All inputs are fully adjustable so it can be adapted to any session, instrument or opening range window.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.