ORB MOMENTUM — USER MANUAL
ORB · Retest · Continuation
Version 1.1 — MetaTrader 5 Expert Advisor
ORB Momentum does not have to strictly trade an ORB strategy. By design, it is an EA that trades breakout-pullback-continuation price action pattern of a trading range so there are many possible settings out there to explore.
This document explains how to configure and run the EA.
Please contact me after purchasing ORB Momentum if you need help with installation, your broker or the settings.
Attached are set files for XAUUSD, GER40, NAS100, US500 and US30
• Overview
• Strategy Summary
• Quick Start
• Input Reference
• Setting Up Session-Time Auto-Adjustment
• Reading the Chart Display
• Reading the Experts Log
• Troubleshooting / FAQ
• Risk Disclosure
ORB Momentum is an intraday, session-based Expert Advisor built around a daily Opening Range. It's designed for instruments with a meaningful daily open — forex, indices, and commodities are the natural fit.
At a glance:
• Platform — MetaTrader 5
• Symbol — Any; you choose what to attach it to
• Chart timeframe — Doesn't matter; the EA calculates on its own internal timeframe (M1 by default), regardless of which chart you drop it on
• Typical frequency — 0–1 trades per instance per day
• Position sizing — Percent risk, fixed dollar risk, or fixed lot size
STRATEGY SUMMARY
Each day, the EA records a short Opening Range (OR) at a time you define, then watches for a multi-step price-action setup to develop within your trading window. Two independent filters — a SuperTrend trend filter and a Choppiness Index market-condition filter — must both agree before any order is sent, so a trade only goes out when the price pattern and the indicator filters are all aligned.
Once in a trade:
• Stop loss is placed dynamically at the current SuperTrend level, so it adapts to volatility rather than sitting at a fixed distance.
• Take profit is a configurable multiple of the initial stop distance.
• An optional trailing stop tightens the stop as SuperTrend advances in the trade's favor.
QUICK START
1. Attach the EA to a chart of the symbol you want to trade. The chart's own timeframe doesn't matter (see InpTimeframe below) — pick whichever is convenient to watch.
2. Decide how you want to configure your time-of-day settings: manual (raw broker server time — simple, but needs re-checking if you change broker or daylight saving shifts) or automatic (recommended — see the Session-Time Auto-Adjustment section).
3. Set your risk mode and amount under Risk Management.
4. Run it in the Strategy Tester first, on your target symbol, to see how it behaves and confirm it takes trades before going live.
5. Enable AlgoTrading and run on a demo account before ever committing real funds.
INPUT REFERENCE
Inputs are grouped in the EA exactly as listed below.
AUTO SESSION-TIME ADJUSTMENT
Controls whether the time-of-day inputs elsewhere in the panel are read as raw broker time, or as a real-world market's local time that gets converted automatically every day. See the worked example later in this guide.
• InpAutoAdjustSession (default: false) — Master switch. If false, every hour/minute input below (Opening Range, Trading Window, Close Time) is used exactly as you type it, in your broker's server time — nothing is converted. If true, those same inputs are read as local time in whichever region InpTargetRegion points to, and converted to server time fresh every day.
• InpTargetRegion (default: TARGET_US_EASTERN) — Which real-world market session your hour inputs represent: TARGET_US_EASTERN (US indices, NYSE-style), TARGET_CENTRAL_EUROPE (EU indices, Xetra-style), TARGET_UK (FTSE-style), or TARGET_CUSTOM (specify your own via the two inputs below).
• InpTargetOffsetStandard (default: -5.0) — TARGET_CUSTOM only. Target region's UTC offset, in hours, during its standard (winter) time.
• InpTargetOffsetDST (default: -4.0) — TARGET_CUSTOM only. Target region's UTC offset, in hours, while its own daylight saving is active.
• InpTargetDSTRule (default: DST_RULE_US) — TARGET_CUSTOM only. Which calendar the target region's own DST follows — see DST rule options below.
• InpBrokerOffsetStandard (default: 2.0) — Your broker's server-clock offset from UTC, in hours, during standard (winter) time.
• InpBrokerOffsetDST (default: 3.0) — Your broker's server-clock offset from UTC, in hours, while the broker's own daylight saving is active. Set equal to InpBrokerOffsetStandard if your broker's clock never shifts.
• InpBrokerDSTRule (default: DST_RULE_EU) — Which calendar your broker's own server clock follows for its shift — see DST rule options below.
DST rule options (used by both InpTargetDSTRule and InpBrokerDSTRule):
• DST_RULE_EU — Shifts on the last Sunday of March and the last Sunday of October. Most retail FX/CFD brokers use this, as does the UK.
• DST_RULE_US — Shifts on the 2nd Sunday of March and the 1st Sunday of November.
• DST_RULE_NONE — Never shifts; a single fixed offset all year.
• InpORStartHour (default: 16) — Hour the Opening Range window starts (0–23). Server time, or the target region's local time if auto-adjust is on.
• InpORStartMinute (default: 30) — Minute the OR window starts (0–59).
• InpORDurationMinutes (default: 15) — How long the OR window lasts, in minutes.
GENERAL
• InpTimeframe (default: PERIOD_M1) — The timeframe the EA uses for all of its internal calculations — completely independent of whatever chart you attach it to. Leave this at M1 unless you understand the trade-off: the setup needs several closed bars, in sequence, inside your trading window, every single day. On a coarser timeframe (H1, for example) too few bars may close inside a typical window for a setup to ever complete. If you do want to experiment with a higher timeframe, widen InpTradeWindowEndHour/Minute substantially to compensate.
Controls for how strictly the EA's internal setup sequence confirms itself before an entry is considered.
• InpRequireCloseForBreakout (default: true) — If true, a breakout only counts when a candle closes beyond the OR boundary. If false, it counts as soon as price touches beyond it intra-bar (looser, triggers earlier).
• InpResetOnOppositeBreak (default: false) — If true, the setup is invalidated and restarts if price closes back through the OR's opposite boundary before the setup completes.
• InpLockSessionBias (default: false) — If true, once the first breakout of the day fires in one direction, the EA ignores opposite-direction breakouts for the rest of the session.
• InpMaxBarsPerStage (default: 0) — Maximum number of bars allowed to sit in any one stage of the setup before it gives up and resets. 0 = unlimited (only your trading window closing will end the attempt).
• InpOneTradePerSession (default: true) — If true, only one trade is taken per day regardless of how many more valid setups appear afterward.
The trend filter that must agree with the setup's direction before entry, and that drives both the stop-loss placement and the trailing stop.
• InpATRPeriod (default: 42) — Lookback period for the ATR used inside the SuperTrend calculation.
• InpATRMultiplier (default: 4.0) — How many ATRs wide the SuperTrend bands are. Larger = slower to flip, wider stops.
• InpRiskMode (default: RISK_PERCENT) — How position size is calculated — see risk modes below.
• InpRiskPercent (default: 1.0) — Percent of account balance risked per trade. Used only in RISK_PERCENT mode.
• InpFixedRiskAmount (default: 100.0) — Fixed amount of account currency risked per trade. Used only in RISK_FIXED_AMOUNT mode.
• InpFixedLotSize (default: 0.1) — Fixed lot size to trade regardless of stop distance. Used only in RISK_FIXED_LOT mode.
• InpRRMultiple (default: 3.4) — Take-profit distance as a multiple of the initial stop distance (e.g. 3.4 means TP is 3.4× further away than SL).
• InpSlippagePoints (default: 5) — Maximum allowed slippage, in points, on order execution.
• InpMagicNumber (default: 20260901) — Identifier tag the EA stamps on its own trades, so it can distinguish them from manual trades or other EAs on the same account. Change this if you run more than one instance on the same account and symbol.
• RISK_PERCENT — Position size is calculated so a full stop-out costs InpRiskPercent% of current balance.
• RISK_FIXED_AMOUNT — Position size is calculated so a full stop-out costs a fixed InpFixedRiskAmount.
• RISK_FIXED_LOT — Always trades InpFixedLotSize, ignoring the stop distance for sizing purposes.
In the two risk-based modes, the calculated size is automatically rounded to your broker's lot step and constrained between the broker's minimum and maximum/volume-limit — you'll see a note in the Experts log any time that constraint changes the size from what pure risk math would have asked for.
• InpUseSuperTrendTrailing (default: true) — If true, the stop loss is moved to just beyond the latest swing high/low whenever SuperTrend flips direction while a trade is open.
• InpUseTradingWindow (default: true) — If true, the setup is only watched for and traded inside the window below. If false, there is no time-of-day restriction (the OR itself still applies).
• InpTradeWindowStartHour (default: 16) — Window start hour. Server time, or target region's local time if auto-adjust is on.
• InpTradeWindowStartMinute (default: 45) — Window start minute.
• InpTradeWindowEndHour (default: 18) — Window end hour.
• InpTradeWindowEndMinute (default: 0) — Window end minute.
• InpUseCloseTime (default: true) — If true, any open position is force-closed at the time below, regardless of its own SL/TP.
• InpCloseHour (default: 18) — Scheduled close hour.
• InpCloseMinute (default: 0) — Scheduled close minute.
Note: the default window is 75 minutes — generous relative to the M1 default timeframe. If you widen the gap between InpORStartHour/Minute and the trading window, or shrink the window itself, keep in mind the setup needs several bars to complete inside whatever window you set.
A ranging-market filter — blocks entries when the Choppiness Index says the market isn't trending, even if everything else lines up.
• InpUseChopFilter (default: true) — If true, entries are blocked when the Choppiness Index is at or above the threshold.
• InpChopPeriod (default: 15) — Lookback period for the Choppiness Index calculation.
• InpChopThreshold (default: 30.0) — Maximum allowed Choppiness value (0–100). Lower values demand a more clearly trending market before allowing entry.
• InpMaxWinsPerSession (default: 0) — Stop taking new entries once this many winning trades have closed today. 0 = unlimited.
• InpMaxLossesPerSession (default: 0) — Stop taking new entries once this many losing trades have closed today. 0 = unlimited.
SETTING UP SESSION-TIME AUTO-ADJUSTMENT
This is the part most worth reading carefully once, since it's easy to configure inconsistently.
The idea: rather than typing raw broker-server hours (which drift whenever your broker's clock shifts for daylight saving, and which mean something different on every broker), you tell the EA two independent things:
1. Which real-world market session you're timing your Opening Range against (InpTargetRegion) — this has its own local time and its own daylight-saving calendar, regardless of your broker.
2. How your specific broker's server clock relates to UTC, and on what calendar it shifts (InpBrokerOffsetStandard/DST plus InpBrokerDSTRule).
Every day, the EA works out both offsets independently and applies the difference — so it stays correct through every future daylight-saving change on either side, on any broker, without you touching a setting.
Worked example — US indices on a typical EU-style broker:
This matches the shipped defaults. Suppose you want your Opening Range to start at 9:30 AM US Eastern time (around the NYSE cash open), and your broker's server runs GMT+2 in winter / GMT+3 in summer, shifting on the usual EU dates.
1. InpAutoAdjustSession = true
2. InpTargetRegion = TARGET_US_EASTERN
3. InpBrokerOffsetStandard = 2.0, InpBrokerOffsetDST = 3.0, InpBrokerDSTRule = DST_RULE_EU
4. InpORStartHour = 09, InpORStartMinute = 30 — now read as 9:30 AM US Eastern, not server time
5. Set InpTradeWindowStartHour/Minute, InpTradeWindowEndHour/Minute, and InpCloseHour/Minute the same way, in US Eastern local time
If your broker's clock instead tracks US daylight saving:
Some brokers shift their server clock on the US DST calendar rather than the EU one, even though the numeric offset (e.g. GMT+2/GMT+3) looks the same. If that's your broker, the only change from the example above is:
• InpBrokerDSTRule = DST_RULE_US instead of DST_RULE_EU
Getting this one setting wrong won't be obviously broken — it'll just quietly drift by an hour for the few weeks each spring and autumn when the US and EU change their clocks on different dates. If you're not sure which your broker follows, ask their support, or watch whether your broker's UTC offset changes on the same weekend as EU clocks or as US clocks the next time either shifts.
How to verify your configuration:
After setting this up, check either the Experts log line printed at startup ("[Session] Auto-adjust ON...") or the last line of the chart comment ("Session-time adjust:"). Both show the exact server time your local-time inputs resolved to today. If you previously had a working manual (server-time) configuration, compare against it — the auto-adjusted result should land on the same server time you were using before.
Other target regions:
Switching markets later — say, adding an EU-indices instance — doesn't require any new logic. Just run a second instance of the EA on the relevant chart, set InpTargetRegion = TARGET_CENTRAL_EUROPE, and enter that market's own local session time. The broker-side inputs stay the same, since it's the same broker.
READING THE CHART DISPLAY
Once running, the EA prints a status block in the chart's top-left comment area, refreshed on every new bar:
• OR — "building..." while today's Opening Range window is still in progress, "SET" once it's locked in, plus the recorded high/low.
• State — Shows the EA's current progress through its internal setup sequence — useful for confirming it's actively working even before a trade appears.
• Direction — Bullish, Bearish, or None — the direction of the current setup attempt, if any.
• Session bias — The direction of the first setup activity seen today, and whether it's locked (see InpLockSessionBias).
• SuperTrend — The trend filter's current reading.
• Choppiness — Current Choppiness Index value, or Disabled/N/A.
• Risk mode — Which position-sizing mode is active.
• Traded today — Whether the EA has already taken its trade for the session.
• Entry window — Whether the current time is inside your configured trading window.
• Past close time — Whether the scheduled flatten-time has been reached.
• Session limits — Wins/losses closed so far today, and whether a session limit has locked out further entries.
• Session-time adjust — Confirms whether auto-adjustment is on, and if so, the net shift applied and the resulting server-time OR start.
A rectangle is also drawn on the chart marking each day's Opening Range window and high/low, for a quick visual reference.
The EA logs each meaningful event with a tag prefix, useful for troubleshooting or just following along:
• [OR] — The day's Opening Range is established.
• [Setup] — The EA's internal setup sequence advances, resets, or is invalidated.
• [Session] — Startup configuration summary, or a win/loss session limit is reached.
• [Risk] — Position-size calculation notes — e.g. the broker's minimum or maximum/volume-limit overriding the pure risk-based size.
• [Entry] — A trade is sent, fills, or fails, with the reason.
• [Trail] — The trailing stop is moved after a SuperTrend flip.
• [Close] — A position is force-closed at the scheduled close time.
TROUBLESHOOTING / FAQ
Q: It hasn't taken any trades in days — is it broken?
A: Not necessarily. This is a low-frequency strategy by design. Check the chart comment's State line to see how far today's attempt has progressed. Early-stage stalls usually just mean conditions haven't been met yet. If progress reaches the final stage but no trade fires, SuperTrend or the Choppiness filter is disagreeing — check those two lines on the comment.
Q: Why does the chart timeframe not matter?
A: InpTimeframe fixes the EA's own calculation timeframe independent of whatever chart you attach it to. This is deliberate — dropping the EA on a coarse chart (H1, for example) without this would leave too few bars inside a normal trading window for a setup to ever complete.
Q: My auto-adjusted time doesn't match what I expect.
A: Double-check InpBrokerDSTRule — see the Session-Time Auto-Adjustment section. This is the single most common misconfiguration, since two brokers can show the identical numeric offset but shift their clocks on different calendar dates.
Q: Can I run this on more than one symbol at once?
A: Yes — attach a separate instance to each chart. If more than one instance runs on the same symbol and account, give each a different InpMagicNumber so they don't interfere with each other's position tracking.
Q: Does this work in the Strategy Tester?
A: Yes, including the session auto-adjustment — it's calculated purely from the simulated date, with no live network dependency, so backtest and live behavior match.
Q: A trade was rejected instead of opened.
A: Check the Experts log for [Entry] or [Risk] lines around that time — common causes are insufficient margin or a stop distance too tight for your broker's minimum stop level.
RISK DISCLOSURE
Trading foreign exchange, indices, commodities, and other leveraged instruments carries a high level of risk and may not be suitable for all investors. Past performance — including any results shown in strategy testing — is not indicative of future results. The default parameter values shipped with this EA are a starting example, not a validated or optimized configuration for any specific account, broker, or market condition; you are responsible for reviewing and adjusting every setting for your own circumstances before trading with real funds. Always test thoroughly on a demo account first. Only trade with capital you can afford to lose.
This manual is provided for informational purposes to explain the EA's configuration and behavior. It does not constitute financial, investment, or legal advice.
If anything is unclear, message me before trading. I would rather help you with the setup than see you take more risk than you intended.
Losses and drawdown periods are possible with trading strategy. Choose a risk level you can comfortably tolerate.