O!kurra
Core Lesson 10 New layer: Trading Hours + stops on the server

Time and failure: Trading Hours + T. on Server

The session schedule decides WHEN the EA looks for entries, and stops pushed out to the broker's server decide WHO watches them when the VPS, the connection or the terminal goes down.

A trading-day bar with the Trading Hours window 09:00–22:00 and a night window 22:00–08:00 with real stops on the broker's server, and below it a comparison of a virtual stop (lives in the EA, dies with the terminal) and a real one (lives at the broker, survives a failure).

Two features, one common denominator: the market is not the same around the clock, and your infrastructure is not reliable.

  • Trading Hours (TH) — a session schedule. Outside the window the EA generates no NEW entries, but manages existing positions normally (BE, TS, reactions all work). A button enabled outside the hours waits “asleep” and starts when the window opens.
  • T. on Server (SS) — moving the stops out to the broker. By default SL/TP in Okurra are virtual (the broker does not see them — the EA closes the positions on the market itself). This gives discretion and flexibility, but has a weak point: it dies together with the terminal. Server Stops mode pushes REAL SL/TP to the broker’s server — the protection will survive a VPS failure, a dropped connection and a terminal restart. The SS schedule switches the mode automatically in the given windows.

The hours in the set = BROKER time — match the windows to your account’s server.

What is enabled and why

FeatureValue in the setRole
TH_Enabled=true, Mon–Thu 09:00-22:00, Fri 09:00-20:00, weekend “no trading”trading during the liquid EU+US hourswe skip the Asian quiet, the rollover and the Friday evening
TH_ExcludeBEaMode=true (factory)buttons in BEa mode work outside the window toobasket defense knows no working hours (important from lesson 11)
SS_ScheduleEnabled=true, Mon–Thu 22:00-08:00real stops FOR THE NIGHTyou sleep — the broker watches
SS_Fri=19:00-23:59real stops before the weekendthe weekend gap with a real SL instead of a virtual one
SS_KeepServerStopsOnOff=true (factory)stops stay on the server after leaving the windowa mode change removes nothing at the wrong moment
The whole stack from lesson 09unchangedcapital protection works in both regimes

The windows use one format: "08:00-22:00", "22:00-08:00" (across midnight), multi "A-B; C-D", "no trading"/"off".

How it makes price behavior visible

  1. The day has a structure. After a week with TH, compare the markers with the previous lessons: a whole class of trades from 0:00–9:00 disappears — a thin market, wide spreads, false stretches. XAUUSD volatility is a function of the clock: London and New York build the moves, Asia corrects them.
  2. Virtual vs real stop. Run a test: turn off the terminal while SS is active — the position still has an SL/TP at the broker (visible in MT5 next to the position). Turn it off outside the SS window — the levels disappear from the broker’s view, they exist only in the EA. That difference is the definition of operational risk.
  3. The weekend gap. The Friday SS window shows what a real stop is for: Monday’s opening price can jump over a virtual level by dozens of points — the broker executes a real SL on the first quote, while nobody would watch a virtual one if the VPS did not come back up.

What to watch

  • The EA panel: TH status (window open/closed) and the T. on Server button switching at 22:00 and 08:00.
  • Positions in MT5: the S/L and T/P columns empty (virtual mode) vs filled (server mode).
  • The behavior of a button enabled outside the hours — a sleep entry in the log and a start when the window opens.

Next step

Lesson 11: Okurra’s most distinctive mechanism — the BEa shield, which walks the whole basket “to even” instead of closing it in panic.

F7 keys in this lesson
  • TH_Enabled
  • TH_Mon
  • TH_Tue
  • TH_Wed
  • TH_Thu
  • TH_Fri
  • TH_Sat
  • TH_Sun
  • TH_ExcludeBEaMode
  • SS_DefaultOn
  • SS_ScheduleEnabled
  • SS_Mon
  • SS_Tue
  • SS_Wed
  • SS_Thu
  • SS_Fri
  • SS_Sat
  • SS_Sun
  • SS_KeepServerStopsOnOff
  • Global_VirtualSL
  • Global_VirtualTP
Lesson .set files

Load these in MetaTrader 5 via F7 → Load to reproduce the lesson exactly. As of release 2.00 the robot starts switched off, so after loading also click ON in the panel's top row — without it nothing will happen. Available to signed-in users with an active licence.

🔒 Sign in with an active licence to download the sets.

Educational material, not investment advice. The sets are teaching examples — before any live use, test on real ticks and tune to your own account. Reference deposit 1000 in account currency, lot 0.01; scale money values proportionally to your balance.