Referencing any System Object function requires the "system." prefix be appended to a System Object function.
Syntax: |
---|
' Sort Instruments by Dictionay Order Value: system.SortInstrumentList( 3 ) |
System Function: |
Description: |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Extract |
Extracts all data series and indicators for all instruments into a file. Optional parameters to control date range and file name. Typically used in the After Test script for audit and reconciliation purposes. |
||||||||||||||||||
Returns true if the default Order object has context, and false if the Order object is null. Null orders are orders that were unable to complete. They cannot be accessed because they no longer exists. |
|||||||||||||||||||
RankInstruments |
Virtually ranks the instruments using the defined long and short ranking. Sets the corresponding Long Rank and Short Rank ordinal values based on the Long Ranking Value and Short Ranking Value respectively. Long Rank is highest to lowest, whereas Short Rank is lowest to highest. Only primed markets ready to trade are ranked. |
||||||||||||||||||
SetAccountNumber() |
Sets the IB account number for all orders in the system. |
||||||||||||||||||
Sets the alternateOrder object by index. Used when looping over all the open orders. To access the order, use the alternateOrder object. This object acts just like the default Order Object and has the same properties and functions. |
|||||||||||||||||||
SetClearingIntent() |
Set to "IB" to clear the system orders in IB, and set to "AWAY" when sending to IB but clearing elsewhere |
||||||||||||||||||
SendToIB |
This function is somewhat deprecated. It is for manual control of the IB process. Users can now connect to IB and send orders to IB through scripting. This function is mostly replaced by the integrated Broker Direct functionality that sends the orders automatically. |
||||||||||||||||||
This function is used to enable or disable the outsideRTH property is a Boolean, and sets whether the IB order can trade outside of Regular Trading Hours. We just pass this to IB. |
|||||||||||||||||||
This function Sets the default routing exchange to be used for all instruments in the system, when sending orders to IB. The information to use with this function is controlled by IB. When it is used, the property information is stored in the System's property: routingExchange. |
|||||||||||||||||||
This function controls the timeInForce property that can be sent with an order. The information is passed to IB so they will know the intent of the order. An examples of what is used is: “GTC” and “Day”, etc. To get a list of what is allowed check with IB for the correct values. |
|||||||||||||||||||
SetVirtualSystem() |
Sets whether the system will be treated as virtual or not. Defaults to False at the beginning of each simulation. If set to virtual, then the results of the system will not be included in the test results. |
||||||||||||||||||
SortInstrumentList() |
Sorts the physical instrument list that is used for the simulation loop using the method indicated:
|
||||||||||||||||||
SortOrdersBySortValue |
Sorts the open order list by the order sort value, as set into each order by order.SetSortValue. This function should only be used in the Before Order Execution script. |
||||||||||||||||||
TotalOrders() |
Use this function without a symbol to return all the open orders in the system.
Use this function with a symbol to return the total open orders in the system assigned to the symbol. |
Links: |
---|
See Also: |
Edit Time: 9/21/2020 3:32:58 PM |
Topic ID#: 610 |