System properties refer to the system which contains the block in which a script runs. If you have multiple systems in your test, these values will be different for Blox that run in those different systems.
The system equity numbers are updated prior to the After Trading Day script, so in this script they will represent the most current equity.
All the properties listed in this table will need to have the object name: system. appended to each property:
Property Name: |
Description: |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
allocationPercent |
Percentage of test equity available to the current system. Percentage is set using the Global Parameter Allocation Slider. |
||||||||||
canTradeInstruments |
Total number of instruments in the portfolio being tested that are primed and also have price information, and are allowed to trade by the instrument's Trade Control Properties. |
||||||||||
cash |
Current cash of the system is determined by subtracting system.currentMargin from system.closedEquity.
•Futures margin is the value entered into the Futures Dictionary that is summed as the Futures margin amount. •Stock margin is the purchase cost of the instruments summed as the total Stock margin amount.
See definitions of: |
||||||||||
clearingIntent |
Sets the default clearing intent to be used for all instruments in the system, when sending orders to IB.
This is a string that that is used by IB – the user should check with IB to find out what the correct value should be for their situation.
Trading Blox function is just passing the IB information back to them. |
||||||||||
closedEquity[] |
The closed equity of the system as of the close of the prior day. |
||||||||||
coreEquity |
Core Equity is updated at each test.currentDay location of a test (not indexed).
|
||||||||||
Correlation |
Removed. Use: Correlation Functions, and the math functions: Correlation, CorrelationLog |
||||||||||
currentClosedEquity |
Current closed equity of the system. Dynamically takes into consideration positions as they are exited. |
||||||||||
currentDrawdown |
Current draw down for the system as a percentage from the highest equity peak. Value returned is a positive number between 0% and 100%. |
||||||||||
currentMargin |
With Futures this is the sum of the Futures margin in use. With Stock class instruments it is the sum of the cash committed to the stocks.
Property system.currentMargin returns the margin amount without the margins planned in open orders.
When the Futures margin or stock cash needed amount of open orders not yet filled or rejected is needed, use system.openOrderMargin as the in incremental amount that will be used when those orders are filled.
This property reports the total in use margin across all instruments, and its value is the same as system.totalMargin, which is now depreciated and will be removed from later versions. |
||||||||||
currentOpenEquity |
Current open equity of the system. Dynamically takes into consideration positions as they are exited. |
||||||||||
currentRisk |
Risk in dollars of all open positions in the system.
Risk for a given position is determined by looking at the difference between the current close price and the protect stop price of each unit to determine the close to protective price spread in points.
Points from each unit are multiplied by the instrument.bigPointValue for each instrument to determine a position's current risk amount. Value returned represents the total amount of risk from all active positions in the system. |
||||||||||
An index number assigned to each system in a Suite by the order in which each system was attached to the Suite. Values for a system are in the range of 1 to the number of systems in the test. The property systemIndex is the same property.
A system with the same name as the Suite is considered a Global Suite System (GSS) and that system will always be assigned an index value of zero. |
|||||||||||
Returns true if the system is a Global Suite System (GSS). |
|||||||||||
Returns True when the system is operating in Virtual Mode. |
|||||||||||
Total amount value needed to fill all the current open orders in the system. For futures, this is the margin times order size, for stocks this is the order price times the order size. |
|||||||||||
maximumDrawdown |
Maximum draw down is the worst percentage value from a peak equity amount experienced by the system found up to that location during a test.
Value returned is a positive number between 0% and 100%. |
||||||||||
Name of the system. Useful for printing, and the same can be used access a different system by name in a multiple system suite. system.index can also be used to find a different system in the same suite. |
|||||||||||
netPositionValue |
This property is for Stocks: •It computes the quantity times the close adjusted by stock ratio and currency conversion. •Adds long positions and subtracts short positions to come up with a Net Position Value. |
||||||||||
Removed. Use system.marketOrdersValue instead. |
|||||||||||
This property uses the SetOutsideRTH is the function that changes this property. It is also a Boolean Property. It is enabled when a IB order can trade outside of Regular Trading Hours. This information is something we just pass on to IB. |
|||||||||||
portfolioName |
Name of the portfolio being used for the system. |
||||||||||
portfolioType |
Returns the class type of the system selected portfio. See: Data Class Properties |
||||||||||
purchaseEquity |
Use with current stock positions. The system's Initial equity amount required to purchase the current open positions (entry fill price times the system's current quantity) is returned. |
||||||||||
rankedInstruments |
Function returns the number of ranked instruments in the system. The number of ranked instruments is the total number of instruments that are primed and ready to trade on the trading day.
Review the following System Properties:•system.totalInstruments •system.tradingInstruments •system.canTradeInstruments •system.totalInstruments is the total number of instruments in the portfolio. •system.rankedInstruments is the number of primed instruments. •system.tradingInstruments is the number of primed instruments that trade on trade date. •system.canTradeInstruments is the number of primed instruments that trade on trade date that are set to AllowTrading.
Review the following trade control Instrument functions:oAllowAllTrades and DenyAllTrades. |
||||||||||
Returns the default routing exchange as set by SetRoutingExchange system Function.. The information to use with this function is determine by IB.
This property is a IB determined string that is controlled by the SetRoutingExchange function. Trading Blox Builder just passes this information to IB when it is needed. |
|||||||||||
This is property is the same as the system.index property. The value returned is the system number that created the order. |
|||||||||||
This property is controlled by the SetTimeInForce function. Its information is a String that 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. |
|||||||||||
totalEnabledInstruments |
Returns the non-disabled instrument count. It can now include non portfolio instruments that can trade using the broker objects. |
||||||||||
totalEquity[] |
Uses the initial starting value entered in the Global Parameters, Equity Manager's Test Starting Equity setting. In scripting the value in the system.startingEquity property is the initialzation value system.totalEquity.
As gains and loss accumulate this property will reflect the summation of all system activity as testing makes progress. Updates to this property happen just after the Can Fill Order script sections finish executing. Adjust Stops section is the first script to execute with the current test day changes.
This property can be Indexed to access previous total equity values. However in all the script sections that process ahead when system.totalEquity is updated there will be no difference in the value between the current and previous element values of this property. In otherwords, system.totalEquity[0] will equal system.totalEquity[1]. After the update for the test day has completed the timing of the Can Fill Order, the difference between these two elements will be the amount of change from the previous test day to the current test day.
Test simulation with only one system in a Suite will have the same value in system.totalEquity as the test.totalEquity, minus interest when the system's System Allocation control slider is set to 100%.
For order generation this is the Order Generation Equity times the allocation.
Note: Value in this property in script ahead of when this property is updated will be the settled value of the prior day. |
||||||||||
totalEnabledInstruments |
Returns the non-disabled instrument count. It can now also include non portfolio instruments that can trade using the broker objects. See Set Parameters script section reference. |
||||||||||
This system property returns the Total Number of instruments in the portfolio that will be used during a test period. It will not include instrument that do not have data record dates that are not in test period between Test Start-Date and the Test End-Date. This was done so difference between the number of instruments in the list of the selected portfolio and the those that Trading Blox Builder prevent the use of memory that will not be available during the planned test dates. It also improves the loading and speed of the test. |
|||||||||||
totalLongPositions |
Number of instruments Long position in the system with a position size greater than zero. |
||||||||||
totalLongUnits |
Total units for LONG positions with a positions size greater than zero. |
||||||||||
totalMargin |
This Property has already been depreciated.
Value returned by this property is the same as system.currentMargin. In scripts where this was previously used change property to system.currentMargin. In new scripts only system.currentMargin. |
||||||||||
[Now Obsolete] |
Total number of open orders for the system that have not been filled or rejected. Property is updated when an order is not rejected and processing returns to the script where the Broker function was executed.
system.TotalOrders can provide the same information as this property. This new property name system.totalOpenOrders is kept for backward compatibility, but could be removed from the manual on a later date. |
||||||||||
totalPositions |
Number of instruments of LONG or SHORT position with a size greater than zero. |
||||||||||
totalShortPositions |
Number of SHORT positions with a size greater than zero. |
||||||||||
totalShortUnits |
Total units for SHORT positions with a position size that is greater than zero. |
||||||||||
totalUnits |
Total number of Long and Short unit positions with a position size greater than zero. |
||||||||||
tradingEquity |
Amount of money available for trading by the current system.
Trading equity is determined by the Global Parameters, Equity Manager's Trading Equity Base parameters:
When Global Parameters, Equity Manager's parameter for Trading Equity Base is set to "Total Equity", the value of system.tradingEquity is equal to the test.totalEquity multiplied by the test.leverage. That resulting value is then multiplied by the system.allocationPercent rate.
Global Parameters, Equity Manager's section parameter for Drawdown Reduction Threshold and Drawdown Reduction Amount settings will reduce the system's equity amount when these parameter settings are greater than zero.
Any value greater than zero entered into the Global Parameters, Equity Manager section for Order Generation Amount will replaces the test.totalEquity value for order sizing. |
||||||||||
tradingInstruments |
Total number of portfolio instruments testing that are primed and have price information for the current test date. |
Links: |
---|
See Also: |
|
Edit Time: 10/31/2020 1:05:26 PM |
Topic ID#: 611 |