
Opening Range Breakout
Send download link to:Opening Range Breakout
What Opening Range
Defines an Opening Range (OR):
You specify the session start time (e.g. 9:30).
It takes the next X minutes (default 30) to measure the high and low of that range.
That becomes your “box” → rangeHigh and rangeLow.
Waits for a breakout:
After the OR is locked, it watches subsequent bars (on a smaller timeframe, e.g. 5-minute candles) for a close above the high or below the low.
If price closes above the range → long entry.
If price closes below the range → short entry.
Draws the OR levels:
At the end of your defined trade window, the system plots two horizontal lines on the chart:
Blue line = OR High
Orange line = OR Low
Places trade only once per day:
After one breakout trade is taken, it will not trade again that session (tradedToday flag).
https://www.youtube.com/watch?v=F3dCfO6ME7M
Where the Stop is set
The stop is placed just beyond the breakout candle that triggered the trade, with a configurable offset in ticks:
If Long:
Stop is set below the breakout candle’s low minus your chosen StopOffsetTicks.
stopPx = candleLow – (StopOffsetTicks × TickSize)
If Short:
The stop is set above the breakout candle’s high, plus your chosen StopOffsetTicks.
stopPx = candleHigh + (StopOffsetTicks × TickSize)
So the stop is dynamic, tied to the exact candle that triggered the breakout, with a small buffer (the offset).
Profit Target
Similarly, the profit target is based on entry price ± the ProfitTargetTicks setting:
If Long:
targetPx = entryPrice + (ProfitTargetTicks × TickSize)
If Short:
targetPx = entryPrice – (ProfitTargetTicks × TickSize)
In short:Opening Range Breakout
Define OR → wait for a breakout candle → enter trade once.
Stop = just beyond breakout candle + offset.
Target = fixed ticks from entry (user-defined).
