This table shows how each Trading Blox Builder script section is available during testing, and when in will execute for each test date and or time. For example, Before Simulation and After Simulation script section will only execute once during the selected Suite test. In a stepped test, Before Test and After Test will execute once for each step in a test.
Before Trading Day and other scripts identified in the table column named: Runs Once Each Bar will execute for each test date or date-time record in the data.
Script section identified in the Runs Once Each Instrument will execute once for each instrument for each date or date-time record in the data file. Instrument identified in this column not assigned a "Y" designation, but instead show a reference notation (see table below), will only execute when the instrument test condition for that instrument requires execution.
All the Trading Blox Builder module scripts are shown in this table:
Each column descriptions shows the details of how often each script is executed for each of the script names.
Only script sections with Trading Blox Builder Basic statements will execute. Script that are blank are not executed.
Only the scripts displayed in blox are executed.
Order number listed to the left of each script name is a relative indication of the order in which the scripts might execute most often. Script execution for section identified with a notation also require the notation's condition be met to enable execution.
Each notational exception is describe in the legend below the table. |
NOTE:
Blox Script name rows in the above image that have a Legend 'D' mark entered in the Instrument column, those script names will automatically provide IPV variables with context so they can be accessed and changed.
Instrument scripts that automatically provide context, will execute each instrument symbol in the portfolio that has a date record in its file that aligns with the system testing date in progress. For example, if there are ten-instruments in the portfolio, each instrument script will execute one time on on each of the system testing dates. When a instrument doesn't have a date that aligns with the current system test date, the instrument object instrument.tradesOnTradeBar property, will be FALSE, and that instrument won't be tested again until has date record that aligns with the system testing date. When an instrument has a date record that aligns with the next system testing date, the instrument.tradesOnTradeBar property will be TRUE.
There are exceptions with the script sections that contained a red Legend 'D' and a green background cell. These scripts have dependencies that are explained in the Legend notes.
Instrument scripts without any Legend symbols, do not automatically provide instrument context, and they do not process each instrument in the portfolio. Howevr, instruments can be processed in these script section, but they must be loaded and processed using the LoadSymbol function using a repeatative loop structure, and they must use Instrument-BPV type variable that is created in the BPV variable creation dialog.
Legend: |
Execution Description: |
---|---|
E-1 |
Unit Size and Can Add Unit scripts will only execute after a Broker Object function call that generates an order to enter the market with a new position or a new unit. Only new entry orders pass through these script sections. See order.isEntry |
E-2 |
Entry Order Filled scripts only execute after the Can Fill Order script section completed its execution and allowed the order to continue. They also require an entry order was filled. See order.continueProcessing |
EX-1 |
Can Fill Order scripts only execute when either an entry has been filled in the market, or when an exit order has closed an active position or any of a position's unit segments. |
R-1 |
Filtered Order Notification will execute after every order rejection. If there is script in this script section, the script can send information showing why the order was rejected to the Log Window display. Note: The Log Window must be open for the print information to appear. |
X-1 |
Exit Orders only execute when there is an active instrument position, and it only executes when the instrument with the active position is sequenced into context. |
X-2 |
Exit Order Filled scripts only execute after the Can Fill Order script section has completed its execution and allowed the order to continue, and when an active position or any of its units have been closed. |
X-3 |
Adjust Stops scripts executes when there is an open position ahead of the risk scripts so that risk information used can be collected and changes can be implemented. |
Custom Scripts |
<Custom-name-scripts> only execute when called. They can be called from any another script, standard or custom, and when they complete their execution they return to line in the script from which they were called. |
Links: |
---|
order.continueProcessing, order.isEntry, System Object, Accessing Instruments, LoadSymbol |
See Also: |
Edit Time: 11/23/2020 1:46:49 PM |
Topic ID#: 173 |