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.

 

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:
system.currentMargin
system.totalMargin

clearingIntent

Sets the default clearing intent to be used for all instruments in the system, when sending orders to IB.

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 the Correlation Functions.

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.

index

Index number assigned to each system in a Suite.  Values for a system are in the range of 1 to the number of systems in the test.  A system with the same name as the Suite is considered a Global Suite System (GSS) and that system is assigned an index value of zero.

isGlobalSuiteSystem

Returns true if the system is a Global Suite System (GSS).

isVirtual

Returns True when the system is operating in Virtual Mode.

marketOrdersValue

Total amount 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

Name of the system. Useful for printing.

openOrderMargin

Property is the value of the margin or cash amount required for all of the open entry orders placed with the broker object and not yet canceled.

orderExists

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.

portfolioName

Name of the portfolio being used for the system

portfolioType

Returns the class type of the system selected portfio.  See: Data Class Properties

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:

osystem.totalInstruments

osystem.tradingInstruments

osystem.canTradeInstruments

osystem.totalInstruments is the total number of instruments in the portfolio.

osystem.rankedInstruments is the number of primed instruments.

osystem.tradingInstruments is the number of primed instruments that trade on trade date.

osystem.canTradeInstruments is the number of primed instruments that trade on trade date that are set to AllowTrading.

 

Review the folloeing trade control Instrument functions:

oAllowAllTrades and DenyAllTrades.

routingExchange

Returns the default routing exchange as set by SetRoutingExchange.

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.

totalInstruments

Total number of instruments in the portfolio being tested.

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

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.

totalOpenOrders

(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 system.totalOpenOrders property 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:

Setting Description:

Global Section:

System Allocation Slider Control

System Allocation

Leverage Contol

Equity Manager

Drawdown Reduction Threshold

Equity Manager

Drawdown Reduction Amount

Equity Manager

 

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:

System Functions

See Also:

 

 


Edit Time: 4/6/2017 02:16:44 PM


Topic ID#: 611

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software