Orders are created by Trading Blox Entry functions. When the entry function generates an order to enter the market, it automatically sends the order to the money manager in the system so a quantity can be added.
To generate orders, click on the Orders Button in the Home Menu group, or press the F7 key. Both methods will run the selected suite and its systems, and generate a report of all the active positions and the current orders for the last data date. Orders listed on the report are for the next market's trading day, or when intraday data is being use, the next price bar record.
from you suite and its system, click on the Orders button, or press the F7 key. menu item. Trading Blox will run a primer simulation based on the test start date, and then generate new orders for the next bar. The next bar is the bar after the last bar -- for intraday data this would be the next hour or minute, and for daily data this would be the next day. The order date and time will be noted on the order file. The results will be stored in the Orders folder as well as displayed.
The next bar is determined by the Test-End date selection and the latest record in the portfolio. When some instruments don't have data that is as late as the latest date of the instruments in a portfolio.
The amount of equity available for order generation will be determined by the ending equity of a test run for the period Start Date to End Date (all data). The test start and end date are used to run a test just prior to Order Generation. This pre test is used to get theoretical positions and equity. Typically the start date is set to the date actual trading has started, so starting equity matches the start date. This start date is left constant as orders are generated in the futures.
Another option is to set the Test Start Date a few years in the past, to get some priming and track record. With this approach, set the Test Starting Equity to an amount such that the Test Ending Equity is equal to the amount at the brokerage. Plus or minus 5% is fine. And as the test ending equity varies over time from the brokerage account, only adjust when outside of a threshold, and then adjust slippage or commission as desired to get the ending equity back in line. The test starting equity can also be adjusted, or capital adds and draws can be used. All positions and orders will likely change as a result of this, so not something to do very often.
Using Capital Adds Draws seems like the least intrusive way to deal with the equity variations, but keep in mind that this could lead to drift from the system design. Imagine constantly adding capital, because the system is making more money than the simulation. Rather than treat the symptom, perhaps treat the cause, which is likely an unreasonably low slippage or commission assumption. Once these are corrected, the system might perform differently than expected or desired or designed.
The filter for volume, margin, and Risk Manager (Can Add Unit script) are run as orders are generated. So orders generated will be pre filtered for these factors. Note that scripts like After Instrument Open, Can Fill Order, and After Instrument Day, will not be run for the order generation bar. The instrument.tradeDayOpen is also not available for the order generation bar.
The name of the file will be: Orders <Timestamp> .mht. The Timestamp has the format YYYY-MM-DD_HH_MM_SS.
The order file will look like the following. It shows the open positions at the top, and the orders for tomorrow at the bottom.
For each order, the Current Position is listed as well: it shows either LONG, SHORT, or OUT; where OUT represents no current open position in the market.
An additional file, "Orders.csv" is created (and overwritten) for every order run. You can open this file in excel, and filter your orders as necessary.
If the data source includes the Delivery Month, the month of the positions will also be listed. The delivery month of the orders generated will also be listed. If they do not match, ie if you have a position in a back month while the data has rolled to the new front month, an * will appear next to the order price to highlight this roll. A note will be printed in the positions section that you should roll this position from the old month to the new month. The roll alert message and * will only show for 1 day. Thereafter it is assumed that the position has rolled from the old position to the new position.
All prices are in current month prices, including the entry price of the position, and all the new order prices. Trading Blox assumes the position will be rolled on the open, because the data has already rolled. It is important to do this in that you want to 'trade what you test.' So if your historical testing assumed a certain roll algorithm, and your data is setup for such, you should roll your positions at the same time.
Distance is the number of ATR from the last Close price to the Order price. This gives you some idea of how much the market would need to move to fill this order, so you can place the orders into the market as necessary.
The ATR used is the Wilder 20-day ATR (39 day Exponential Moving Average of the True Range).
The Last Bar is the date of the last bar of data for the market. If this date is not the current date, or as expected due to holidays, then you should double check your data. It's possible the data for a particular market was not updated on schedule. In this case the Order Report is for April 6 ( Monday) and all the markets have a Last Bar of April 3 (Friday).
The Message is a custom value set in Blox Scripting. This can be any message (string value) as needed by the system.
Edit Time: 10/18/2017 1:36:40 PM
Topic ID#: 148