Navigation: Trading Your System >

Tomorrow's Orders

 

 

 

 

RealTest includes an Orders run mode that you can use to run a script and generate brokerage orders for tomorrow's trading (or today's trading if it's the morning before the market open).

The key point is that RealTest is designed to fully support order generation for daily trading systems -- systems for which all orders for the upcoming day can be specified when the market is not currently open. In other words, RealTest does NOT support live trading of strategies that would require live data to evaluate realtime intraday trading signals. In practice, since RealTest can't backtest intraday strategies either, this is not a major limitation to its order generation capabilities.

After a test is run in Orders mode, a new Log Window is opened showing the list of orders that would need to be placed with a broker before the open of the next day after the last date of the test. This can also be thought of as Tomorrow's Orders.

To best illustrate this feature, open the mr_sample.rts example script, and modify its Settings section to look like the following:

This will model a trader who started trading the strategy at the beginning of 2020 with a $100K account and needs to know what orders to place for live trading on November 18.

(In actual usage, you would leave the EndDate set to Latest and re-import the data file each day.)

After running with these settings by clicking , the Orders log window appears:

Please note that unless you are using OrderClerk, this is only a best estimate of what your orders should be. There is no way for RealTest to know what your actual fill prices and quantities were when recent positions were entered, what deposits or withdrawals you've made in your account, and so on.

This pair of strategies use the MaxSetups / SetupScore technique to ensure that the number of limit orders placed each day does not exceed your available position slots.

These strategies also use NextOpen as the ExitTime for their rule-based exits (this is the default ExitTime).

These two facts are why it is possible to determine "tomorrow's orders" ahead of time.

For strategies that use ThisClose entries or exits, it is not possible to foresee what tomorrow's orders will be.

In this case, this caveat will be indicated in the log (here demonstrated by temporarily ExitTime to ThisClose for these strategies):

 

Note also the "child: " orders that are added after each entry order in the first order list shown above.

This is because this strategy includes an ExitLimit formula (profit target) that might trigger on the same day that a position is entered. In practice, one could place these as "child orders" with a broker, meaning the order is only activated after the parent order has been filled.

If you modify the ExitLimit formulas so they don't apply on entry day, the child orders are no longer included:

 

If a strategy uses MaxEntries with unlimited setups, the log text will include a caveat about how many fills to allow:

(etc.)

Advanced Live Data Mode

A special advanced mode is also available, which turns this feature into "Today's Orders".

Add OrdersLiveData: True to your Settings to activate this mode.

Note that doing so assumes that you have found a way to obtain and import today's daily bars for all stocks BEFORE the market has closed, and that your strategies use ThisClose as their EntryTime and/or ExitTime.

 

 

 

 

Copyright © 2020-2022 Systematic Solutions, LLC