Live Trading Operations
Keeping exported GSB systems running correctly on your trading platform, day after day
The export pages show you how to get a system onto a chart. This page is about what happens after that: the operational problems that cause most live-trading errors, and how Peter Zwag, GSB's developer, deals with them. Most of it is about TradeStation, which is what Peter trades on.
It's about operating the platform safely. It doesn't tell you which systems or markets to trade.
Risk warning. Live trading carries real risk of loss. GSB and platform backtests are hypothetical, and past or hypothetical results don't guarantee future performance. This page is general education, not trading advice. Trade in simulation first, and never trade money you can't afford to lose.
1. Before the first live trade
- After a GSB walk-forward, trade the walk-forward version of the code (copied with Copy for live trading) with Use WF Current Params on. See Export to TradeStation.
- One system per chart. Several systems on one chart cause exit problems.
- If you trade more than one contract, scale the dollar stop in the code to match, or the drawdown can be far bigger than the backtest. For micro contracts built on the mini, divide the stop and target by 10.
- Don't add broker-side stops or targets tighter than the system's own. Peter gives the example of a $1,000 broker stop that cut a trade which went on to make $5,800.
- Optional, in TradeStation: tick the option to send strategy-generated stop orders to the TradeStation server, so stops still work if your PC drops out.
- Create any custom session templates the charts need (for example
0900_1430) before you open a workspace on a new PC. TradeStation doesn't save session templates inside the workspace. - After upgrading to TradeStation 10, add antivirus exclusions for the new TradeStation 10 folders as well as
C:\GSB. Peter pointed out (2023) that the upgrade doesn't carry the old exclusions across.
2. End-of-day exits
EasyLanguage's built-in SetExitOnClose is fine for backtests but can fail live on TradeStation 10, unless the session ends at the exchange's standard close. Peter's fix is an explicit exit on the last bar of the session:
vars: eod(0);
once eod = SessionEndTime(0, 1);
if Time = eod and CurrentContracts > 0 then begin
Sell ("LX_EOD") this bar at close;
Buy to cover ("SX_EOD") this bar at close;
end;- Rather than a market order at exactly the close, Peter prefers a limit exit that lasts up to about 60 seconds, then a market order if it hasn't filled.
- For Eurex markets such as the DAX, end your chart session at least 1 minute before the exchange closes.
- Don't shorten the GSB session to work around fill problems: fix the exit on the platform instead.
- If market-on-close exits don't fire at all, check that your data time zone matches between GSB and the chart.
- Trademaid Automation for TradeStation handles end-of-day exits itself, so you don't need this code if you use it.
- Swing systems that enter at the close: if the order is rejected because the session has already closed, Peter's advice (2022) is to enter as soon as the market reopens.
3. Holidays and half days
- A system that exits at a fixed time won't exit on a day the exchange closes early.
- Peter turns his ES, NQ and YM day-trading systems off on half days, and leaves longer-term swing systems running.
- Two code options: wrap the entries in the
HolidayNHalfDay(date)function from the GSB functions ELD, or addholiday1andholiday2inputs (dates as YYYYMMDD) and block entries on those dates. - After a half day or holiday, the previous close is wrong until TradeStation recalculates it at about 8:30–8:31 am US Central time. At about 8:31, refresh every
@daily-bar symbol (for example@ES.D) with Ctrl+R and check each chart has reloaded with its trades. - If you do leave a day system running on a half day, have it exit about 30 minutes before the early close. A system that missed the early close on a half day in July 2021 is why Peter suggests this.
- If you use Alertmon, put it to sleep over holidays rather than closing it.
4. Rollovers and symbol substitution
Peter calls rollovers the number one cause of trading errors, and they're always human error.
- TradeStation rejects orders on continuous symbols, so you trade the specific contract. Near the roll, make sure every data stream on the chart uses the same contract.
- TradeStation rolls
@ESaround the second Wednesday of the expiry month. Interactive Brokers' roll dates can differ from TradeStation's. - Peter strongly recommends keying your charts off the continuous contract (for example
@NQor@NQ.D) and using symbol substitution to send orders to the actual contract. On TradeStation this needs Trademaid Automation for TradeStation. - Some brokers block new crude oil (CL) positions close to expiry, so roll early there. An alert when Data1 and Data2 are on different contracts catches mistakes.
- One more reason to key charts off the continuous symbol: in August 2022 Peter noted a trade that charts keyed off
@ES.Dtook but some charts on a dated contract missed. With symbol substitution the order still goes to the dated contract, so the point above about trading the specific contract still stands. - Trademaid posts TradeStation's rollover dates on the forum each year.
- Micro symbols: TradeStation uses the two-digit year (for example
@MESM21); MultiCharts uses a one-digit year.
5. TradeStation stability
- Restart TradeStation daily, or at least weekly. In 2022 Peter was rebooting his TradeStation server twice a week because of chart-count limits and memory leaks.
- Keep chart history short, about 1 year. A Data3 on larger bars may need about 2.5 years. Charts loaded back to the contract start are very likely to crash it.
- Keep each TradeStation instance to about 48 charts. Run another instance (another login or VM) if you need more.
- In Desktop → Performance, set the number of
orchart.exeprocesses to manual, equal to your CPU cores. Auto often gives only 2. - TradeStation can crash when you log in by Remote Desktop (RDP). Peter stays logged in and uses AnyDesk instead.
- Use a VM with dedicated (not oversold) cores, about 1 ms from TradeStation's servers. Peter advises against trading from Australia or New Zealand because of latency and dropouts.
- Stop forced updates, so a new build doesn't arrive mid-session: use the "disable updates" setting in Alertmon or Trademaid Automation, or a batch file that deletes TradeStation's
Patchesfolder before startingORPlat.exe. - Choose a stable build. As of December 2024 Peter's choice was TradeStation 10, build 76; he found later builds less stable at the time. Check the forum for his current view.
- Back up your workspaces regularly and zip them: a zip's integrity check shows up a corrupted file. Keep them in a format an older TradeStation build can open.
- TradeStation 10 or 9.5? Users found TradeStation 10 much less stable than 9.5 when it was new (2020). By February 2023 Peter found TradeStation 10 better on memory leaks, which had got worse on 9.5, although its CPU use often ran high on VMs.
- If TradeStation keeps crashing: run a repair from Windows Add/Remove Programs, delete the TradeStation cache, then reload your workspaces.
- Don't clear the cache as routine. Peter (2022) only deletes it when there's a problem. Afterwards, open every chart and let its data load fully, close them all, then open them again before trading.
6. Shadow and phantom trades
- After a chart reload, TradeStation can show a trade that never happened in real time, or drop one that did. Flatten any system that shouldn't be in a position.
- Re-check positions after the close from a second login.
- Run a second copy of TradeStation (another login or VM) with the same charts as a cross-check. If the two disagree about a trade, refresh the strategy on the backup copy (toggle its Status off and on) and compare again. Peter suggested this in 2022 after a trade most users got was missed by one.
- The tell-tale sign: a strategy shown as active on the chart but missing from Trade Manager's Strategy Positions tab.
- Don't use chart Reload to refresh a GSB strategy. Toggle the strategy's Status off and on instead.
7. Several systems on one symbol and account
- TradeStation needs its option that allows long and short positions on the same symbol switched on.
- Interactive Brokers can reject an order "due to crossing of resting order" when one system's resting stop or target opposes another system's order, especially when every system exits in the same second at the close. Staggering exit times by a few seconds helps. A second account may not, because IB can still detect you trading against yourself.
- Two systems exiting in opposite directions at the same time pay costs twice.
- An end-of-day close-all tool closes every position in that symbol at once, so don't mix overnight and day-trading systems on one symbol in one account with it.
8. Monitoring tools
Trademaid offers two add-on tools that Peter uses to watch live systems:
- Alertmon raises an alarm when a strategy's position doesn't match the account. Set "always update session time" to True (newer builds default to it), or it keeps an old session time and raises false alarms. It also has memory-leak and
orchartalarms. - Trademaid Automation for TradeStation (TMA) adds symbol substitution, staggered end-of-day exits, limit-then-market close exits and slippage tracking.
- Both use your PC's local time, so set the clock and time zone correctly.
- If TradeStation crashes with open positions, Peter's order is: start TradeStation offline, set TMA's status to off, go online, then turn the charts back on.
9. Reviewing a live system
- Judging a system on a one-month lookback is noise. Look at it against its full walk-forward history.
- Peter re-optimises rarely. GSB systems don't need frequent re-optimisation, and anchored walk-forwards suit them (see Walk-Forward Optimization).
- Write your review rules down before you go live, and use Portfolio Analyst Pro to see how each system affects the whole portfolio.
10. Interactive Brokers notes
These were Peter's observations at the time; check IB's current rules before relying on them.
- TWS logs out every day and IB Gateway every week. Peter used IBController with his own scripts so TWS logs itself back in.
- IB's price history isn't good enough to build GSB systems on.
- The combined TradeStation-and-IB platform's data isn't back-adjusted, which makes it unsuitable for running GSB systems built on back-adjusted continuous data (Peter, December 2025).
Further reading on the Trademaid forum
- General support questions (rollovers, end-of-day exits, several systems per account)
- Update to GSB methodology
Next Steps
Once systems are running, macros can take over the repetitive build-and-test work:
