Skip to content
ViprasolWE SOLVE INFINITYGet started
Back to Blog

How to Trade the ORB Strategy Step by Step (Forex, Gold, Indices)

A step-by-step ORB strategy walkthrough for forex, gold and index futures: pick the session, mark the range, enter, place the stop and exit.

Viprasol Tech Team
11 min read
Updated 2026

How to Trade the ORB Strategy Step by Step (Forex, Gold, Indices)

TLDR

ORB strategy trading means marking the high and low of the first minutes of a session, waiting for price to close outside that range, entering in the direction of the break with a stop inside the range, and exiting at a fixed reward-to-risk multiple or a time cutoff. The rules are the same on every market; what changes between forex, gold and index futures is which session counts as "the open", how wide the range tends to be relative to the stop you can afford, and which filters stop you from trading the dead hours. This article walks through the seven steps in order, with one gold trade worked out in full and an original Pine Script v6 strategy you can test on any of the three markets.

Before the steps: what you need to have decided

Our pillar article on the opening range breakout strategy covers why the opening range carries information, how to pick between 5, 15, 30 and 60 minute ranges, and the ways ORB fails. This piece assumes you have read that and now want an operational checklist. Three decisions have to be made before step one, and they should be written down, not held in your head:

  • Which session is "the open" for your instrument. Index futures have an obvious cash open. Forex and gold trade around the clock, so you choose a session open and treat it as the reference. The table below gives the usual choices.
  • Range length in minutes. 15 is the common default; 5 suits fast index products and produces more signals; 30 or 60 suit slower pairs and reduce false breaks at the cost of a wider stop.
  • Risk per trade as a percentage of account. This fixes the position size once the stop distance is known. 0.5% to 1% is the conventional band for a strategy that can lose several days in a row; the pillar explains the arithmetic.

Step 1: pick the session and the range window

The opening range only means something if the minutes you measure contain a real burst of participation. On an index future that is the cash equity open. On forex and gold there are two candidates, London and New York, and each has a different character.

MarketReference openTypical range windowWhat to watch for
US index futures (ES, NQ, YM, MES, MNQ)09:30 New York (cash open)09:30 to 09:45 (15 min) or 09:30 to 09:35 (5 min)Pre-market news already priced in; range can be very wide on event days
European index futures (DAX, FTSE, Euro Stoxx)08:00 London / 09:00 Frankfurt cash openFirst 15 or 30 minutesUS data at 13:30 London often reverses the morning move
Forex majors (EURUSD, GBPUSD, USDJPY)08:00 London or 08:00 New YorkFirst 30 or 60 minutesLondon range is often tighter and cleaner; New York overlaps London and can be choppy
Gold (XAUUSD spot, GC futures)08:00 London or 08:20 New York (COMEX pit open)First 15 or 30 minutesReacts hard to US data at 08:30 New York; a range ending before that can be invalidated minutes later

Whichever you choose, set the chart timezone to match and never let the window straddle a scheduled data release. A 15 minute gold range that runs 08:15 to 08:30 New York ends exactly when the biggest US releases hit; that is not a range, it is a coin flip. Shift the window or skip those days.

Step 2: mark the range and wait for it to close

Do nothing while the range forms. The high and low are not final until the last bar of the window closes, and a breakout of a range that is still being drawn is not a breakout. On a 1 minute chart that is 15 bars of watching; on a 5 minute chart it is three. Many traders find a 5 minute chart for the range and a 1 minute chart for the entry is the practical compromise.

Once the window closes, record three numbers: the range high, the range low, and the range width. Width matters more than most people expect, because it becomes your stop distance in step 5, and a stop that is too wide for your risk budget means a position so small the trade is not worth the commission.

Step 3: check the filters before you are allowed to trade

Filters are what separate a tested rule set from "buy when it goes up". Apply them in this order and skip the day if any fails:

  1. Range width against normal. Compare today's width to the average of the last 20 sessions' ranges. A range far below average tends to produce breaks that are noise; a range far above average leaves too little room to the day's likely extremes. Set your own bands and keep them fixed.
  2. Scheduled news inside the entry window. If a top-tier release lands within the time you would be holding the trade, either stand aside or accept that the stop may be jumped. This is the single biggest cause of outsized ORB losses on gold and forex.
  3. Higher timeframe context. Optional, but a break in the direction of the daily trend is a different trade from a break against it. Decide in advance whether you take both or only the aligned side. The confluence trading article shows how to make that an objective rule rather than a feeling.
  4. Spread. On forex and spot gold with a CFD or spot broker, a spread that has not normalized after the open eats into a tight stop. Wait for it to settle or skip.

Step 4: enter on the first close outside the range

The entry signal is a bar close beyond the range high (long) or low (short), not a wick. Entering on the touch is faster and gets you into every real move a few ticks earlier; it also gets you into every false one. Entering on the close costs some distance but removes the worst of the stop-runs. Pick one and keep it; mixing them is how backtests stop matching live results.

Take only the first break of the day. If it stops out and price later breaks the other side, the second trade is a different strategy with different statistics. If you want to test the reverse-and-go variant, test it separately.

Set a time cutoff for entries. A break that arrives three hours after the open on an index future is not an opening range breakout, whatever the chart says. Common cutoffs are 60 to 90 minutes after the range closes.

Step 5: place the stop and size the position

The stop goes inside the range: at the opposite side for the conservative version, or at the midpoint for a tighter but more fragile version. The stop distance in price units then fixes the position size:

position size = (account x risk per trade) / (stop distance x value per point)

Round down to the instrument's minimum step. If the rounded size is zero, the range is too wide for your account today and you skip. That is not a failure of the strategy; it is the strategy telling you the day does not fit.

Step 6: set the target and the time exit

Two exits, whichever comes first. The target is a multiple of the stop distance, typically 1.5 to 2.5 times; the exact multiple should come from your backtest, not from a rule of thumb. The time exit closes whatever is open at a fixed clock time: for index futures many traders use the end of the morning session, for forex and gold the close of the London afternoon or a fixed number of hours after entry. Trades that have neither hit target nor stopped out by then are usually chop, and chop is where overnight risk and widening spreads live.

Step 7: log it

Record the session, range width, filter outcomes, entry price, stop, target, exit price and reason, and the slippage between your intended fill and the real one. After 50 trades you will know whether your live execution resembles the backtest; after 100 you can start asking whether the filter thresholds need to move. Without the log you will change rules based on the last three trades, which is the fastest route to a strategy that never stabilizes.

Worked example: one gold trade with the arithmetic shown

All numbers below are illustrative, chosen to make the arithmetic clear, not taken from any specific day.

  • Instrument: XAUUSD spot, quoted in US dollars per ounce, trading 0.01 lots minimum where 1.00 lot is 100 ounces.
  • Account: 10,000 USD. Risk per trade: 0.75%, so 75 USD.
  • Session: London. Range window 08:00 to 08:30 London. Range high 2,418.60, range low 2,412.20. Width 6.40 USD per ounce.
  • Filters: 20 session average width is 7.10, so today sits inside the normal band. No top-tier US data until 13:30 London. Daily trend up. Spread back to normal by 08:20.
  • Entry: 08:40 bar closes at 2,419.40, above the range high. Long at 2,419.40.
  • Stop: range low, 2,412.20. Stop distance 7.20 USD per ounce.
  • Value per point: 1 USD per ounce per 1.00 lot is 100 USD. Per 0.01 lot it is 1 USD.
  • Size: 75 / (7.20 x 100) = 0.104 lots, rounded down to 0.10 lots. Actual risk at the stop: 7.20 x 100 x 0.10 = 72 USD.
  • Target at 2.0R: 2,419.40 + (2 x 7.20) = 2,433.80. Potential gain before costs: 14.40 x 100 x 0.10 = 144 USD.
  • Time exit: 13:00 London, before the US data window.

Suppose the trade reaches 2,433.80 at 11:10. Gross profit 144 USD. If the broker's spread at entry was 0.30 and the fill on the target was 0.10 worse than the level, the realized profit is roughly 144 - (0.40 x 100 x 0.10) = 140 USD. If instead the stop had been hit, the loss would be about 72 USD plus the same friction, roughly 76 USD. Over many trades the ratio of those two numbers, combined with how often each happens, is the whole strategy. Nothing else matters.

Original Pine Script v6: session-selectable ORB strategy

The pillar article publishes an ORB indicator. The strategy below is the companion for testing the seven steps above on forex, gold or an index: pick the range window and the entry window in the inputs, set the timezone, and the script takes the first close outside the range with a stop at the opposite edge, a reward-to-risk target and a time exit. Set commission and slippage in the strategy properties before trusting the report; the backtesting platforms article explains why.

//@version=6
strategy("ORB Session Strategy (illustrative)", overlay=true,
     default_qty_type=strategy.percent_of_equity, default_qty_value=1)
sess    = input.session("0800-0830", "Opening range window")
entryW  = input.session("0830-1300", "Allowed entry window")
tz      = input.string("Europe/London", "Session timezone")
rr      = input.float(2.0, "Reward to risk", minval=0.5, step=0.5)
inRange = not na(time(timeframe.period, sess, tz))
inEntry = not na(time(timeframe.period, entryW, tz))
var float orHigh = na
var float orLow  = na
var bool  traded = false
if inRange and not inRange[1]
    orHigh := high
    orLow  := low
    traded := false
else if inRange
    orHigh := math.max(orHigh, high)
    orLow  := math.min(orLow, low)
rangeDone  = not inRange and not na(orHigh)
longBreak  = rangeDone and inEntry and not traded and close > orHigh
shortBreak = rangeDone and inEntry and not traded and close < orLow
if longBreak
    strategy.entry("L", strategy.long)
    strategy.exit("LX", "L", stop=orLow, limit=close + (close - orLow) * rr)
    traded := true
if shortBreak
    strategy.entry("S", strategy.short)
    strategy.exit("SX", "S", stop=orHigh, limit=close - (orHigh - close) * rr)
    traded := true
if not inEntry and strategy.position_size != 0
    strategy.close_all("Time exit")
plot(rangeDone ? orHigh : na, "OR High", color.teal, 2, plot.style_linebr)
plot(rangeDone ? orLow : na, "OR Low", color.maroon, 2, plot.style_linebr)
bgcolor(inRange ? color.new(color.gray, 90) : na)

Notes on the code: the range resets on the first bar of each new session window, so one trade per day is enforced by the traded flag. The time exit uses the end of the entry window; if you want entries to stop earlier than the forced exit, add a third session input. The stop is at the opposite range edge; to test the midpoint variant replace orLow with (orHigh + orLow) / 2 in the long exit and the mirror in the short. Width and news filters are deliberately left out so you can see the raw edge first and then measure what each filter adds.

Market-specific adjustments

Forex

Ranges on the majors are measured in pips and are often narrow relative to the spread at the London open. Favor 30 or 60 minute windows, insist on the spread filter, and be aware that the New York open overlaps the London afternoon so a "New York ORB" on EURUSD is really a continuation or reversal of a move already in progress. Pairs with a single dominant session, such as AUDUSD into Sydney or USDJPY into Tokyo, can be traded on their own session open but liquidity is thinner and slippage on the break is larger.

Gold

Gold has two credible opens and reacts violently to US data. The London window gives cleaner ranges; the New York window gives bigger moves but a high chance of a data release inside the hold. Many gold ORB traders run the London range and stand aside on the days with a top-tier US release before noon New York. Gold also gaps at the Sunday evening open; treat Monday's first session with extra caution or skip it.

Index futures

The cleanest ORB market because the cash open is a real event. The failure mode is the opposite of forex: ranges on news days are so wide the 1% risk budget produces a size below one micro contract. Having the micro contract available (MES, MNQ) is what makes the strategy tradeable on smaller accounts. Watch the 10:00 New York data slot, which lands right at the usual entry cutoff.

FAQ

Is the ORB strategy suitable for beginners?

The rules are simple enough to learn in a day, which is why it is popular with newer traders. The difficulty is not the rules but following them on the days they produce losses. Paper trade or test with a small size until your log shows you executing the plan as written.

Which session should I use for the ORB strategy on forex?

There is no universal answer. London tends to give tighter, cleaner ranges on the European pairs; New York gives larger moves on the dollar pairs but overlaps a session already in progress. Test both on your pair with identical rules and keep the one whose statistics you trust.

Can I trade the ORB strategy on gold with a small account?

Only if the broker offers 0.01 lot sizing and the range width on your chosen window fits inside your risk budget. Run the sizing arithmetic in the worked example with your own account figure; if the rounded size is routinely zero, use a shorter range window or a different instrument.

Should the stop be at the range edge or the midpoint?

The edge is wider, gets hit less often, and produces a smaller position. The midpoint is tighter, gets hit more often, and produces a larger position for the same risk. Neither is right in general; the backtest on your instrument decides.

How do I automate this?

The Pine strategy above can fire alerts that a webhook bridge turns into broker orders, or the same rules can be rebuilt as an MT5 expert advisor with the daily guards a prop firm expects. The ORB pillar article compares discretionary and automated execution in more detail.

Where Viprasol fits

Viprasol writes TradingView indicators and strategies in Pine Script v6 and MT5 expert advisors in MQL5. For ORB traders the usual request is the breakout indicator with session presets for forex, gold and indices, the width and news filters from step 3 built in, and alerts that a bridge can execute. If you want the seven steps running without you at the screen, our Pine Script development service delivers the strategy version with cost-aware testing, and the MT5 route is covered by our expert advisor service. Describe your session, instrument and risk rules through the contact form; pricing is on the pricing page.

Risk disclaimer: trading futures, forex, CFDs, gold and crypto involves substantial risk of loss. This article is educational and is not investment advice; illustrative figures and backtests do not indicate future performance.

orb strategy tradingorb strategyopening range breakoutforex orbgold orb strategyindex futurespine script

External Resources

Share this article:

About the Author

V

Viprasol Tech Team

Custom Software Development Specialists

The Viprasol Tech team specialises in algorithmic trading software, AI agent systems, and SaaS development. With 1000+ projects delivered across MT4/MT5 EAs, fintech platforms, and production AI systems, the team brings deep technical experience to every engagement.

MT4/MT5 EA DevelopmentAI Agent SystemsSaaS DevelopmentAlgorithmic Trading

Ready to Automate Your Trading?

Discuss a custom Expert Advisor with defined strategy rules, risk controls and a testing plan.

Free consultation • No commitment • Response within 24 hours

Viprasol · Trading Software

Need a custom EA or trading bot built?

We build MT4/MT5 Expert Advisors around your strategy, broker and risk requirements. Each project has an agreed scope, testing plan and individual quote.