The following properties refer to the test object and they will be the same regardless from what system they are referenced.

 

All Test Object properties are used with the "test." object prefix.

 

Example:

PRINT "Test Name: ", test.name
PRINT "Order Report Path: ", test.orderReportPath

 

Properties:

Description:

abortTestPending

Returns true when the Abort Test or Abort Simulation functions have been used.

baseCurrency

Returns the ISO code of the system wide base currency set by the user in the Preference section.  i.e. USD is used for United States Currency.

baseCurrencyBorrowRate

Borrow rate of the system wide base currency

baseCurrencyLendRate

Lend rate of the system wide base currency

baseCurrencySign

Returns the ISO currency sign symbol for the system wide base currency  set by the user in the Preference section.  i.e. USD uses $

capitalAddsDrawsTotal

Total capital adds and draws to date, from the capital adds draws file.

currentDate

Current simulation date. In YYYYMMDD format.

currentDay

Number count of the current day.  Count starts at one on the day of the Test Start. Also used as the Test Bar when using Intraday Data, so this can be the "Test Bar Number" when using date and time.

currentParameterTest

Number of the current active parameter step test

currentTime

Current simulation time.  In HHMM format.

dayEndTime

For intraday data, last testing time of the day.  Computed as the latest time for any market in the test, or as set in scripting. See test.SetEarliestTime and test.SetLatestTime and test.SetTimeIncrement.

feesIncentiveAccrued

Incentive fees accrued but not yet booked.  See: Fee Accruals & Capital Adds & Draws

feesIncentiveTotal

Total incentive fees booked to date.

feesManagementAccrued

Management fees accrued but not yet booked.

feesManagementTotal

Total management fees booked to date.

forexDataFolder


forexDataPath

Provides the full path to the Forex Files.  Default Forex path: C:\Trading Blox\Data\Forex\

futuresDataFolder


futuresDataPath

Provides the full path to the Futures Files.  Default Forex path: C:\Trading Blox\Data\Futures\

instrumentCount

Total number of instruments being tested across all systems.  This properties value will include forex conversion files and if systems are using different portfolio types, could include stocks, futures, and forex markets.  Does not include markets loaded using the LoadSymbol function.

instrumentList[]

List of all instruments in all the system portfolios, including the Forex conversion files. Indexed from 1 to InstrumentCount. Returns the full symbol, such as F:CL or S:IBM.

instrumentListRef

This property provides a faster access to instrument information that using an instrument property.  It is faster because it is a memory pointer.  Pointers are used a lot in the best program so the software's design allows the program's options to work as fast as possible.

 

 

The various "ref" properties are object pointers to the actual instrument. Makes them very fast.

 

You can use test.instrumentList[x] to loop over the instruments in the test, but that returns a symbol, and TB then needs to lookup that symbol to find the instrument. Whereas the test.instrumentListRef[x] is an array of object pointers - immediate access to the instrument when used in the LoadSymbol.

 

leverage

Leverage as set in Global Parameters

marketOrdersValue

Total amount needed to fill all  current open orders in all the systems in the suite.  For Futures, this is the margin times order size, for Stocks, this is the order price times the order size.  Better details available in the system.marketOrdersValue description topic.

maxUnitsSuiteParameter

This property return the max units number that is set in the Simulation's "Max Position Units" parameter setting.

maxUnitsSuiteParameter


name

Name of the Current Test Suite.

orderGenerationBar

Returns true if the current bar is after the test end record, and therefore the order generation bar.  Useful with with intraday data where you can check the test.orderGenerationBar return value.  If its return is TRUE you can output all the relevant data for the last bar.

orderGenerationTest

Returns true if the test is generating orders, rather than just running a performance test.

orderReportPath

Full path of the current order report

primeStart

Earliest date for all loaded data for any instrument

resultsReportPath

Path of the results folder for this test. Used to access charts and graphs in the test results folder for display.

sellStockSplitRemainder

Global parameter setting value of the Sell Stock Split Remainder value.  Returns a True or False value.

SetTimeIncrement

You can force the minimum time increment used for testing by changing from the default value.

In the Before Simulation Script, use the function to set HHMM time to use:

test.SetTimeIncrement(1)   ' This sets the time to 1 minute
test.SetTimeIncrement(130) ' This sets the time to 90 minutes

 

Or, set to your desired bar size, such as 5 minute or 60 minute. The test will run for each bar, and the last available instrument bar will be used for order generation.

smartFillExit

Returns a True or False value of the Global Parameter option "Smart Fill Exit" setting.

stockDataFolder


stockDataPath

Provides the full path to the Stock Files.  Default Forex path: C:\Trading Blox\Data\Stocks\

summaryResultsPath

Full path of the current test results saved file location. file.

Example:

'  Script sends Test Performance Folder name to Print Output.csv file.
Print test.summaryResultsPath

 

Return Example:

Test 2016-04-28_09_08_04

systemCount

Number of systems to be tested.

testEnd

Test End date. The user entered end date, or the end of data, which ever comes first.

testStart

Test Start date. The first trading day equal to, or after the user entered start date, or the start of data, which ever is later.

threadCount

Number of active threads available in this Simulation test.

threadIndex

Active thread index of this simulation test. Each thread index up to ThreadCount will run concurrently, so if variables, or information needs to be passed from one thread to another, make sure the ThreadIndex is a match.

timeIncrement

Returns the TimeIncrement used for the test loop when using Intraday data.  Output format is HHMM (Hour-Minute) order.

timeStamp

Start Time stamp of this test. Used to access charts, graphs, and other results for the test run.

totalParameterTests

Total number of distinct parameter tests.

 

Stepped Parameter information can be accessed using the test.GetSteppedParameter

totalZeroSizedTrades

The number of trades in all of the systems that had a trade quantity of zero.  Useful for custom statistics to include or exclude these placeholder trades.

walkForwardStatus

Returns 0 for a normal test, 1 for the optimization portion of the walk forward test, and 2 for the out of sample portion of the walk forward test.

 

At the beginning of each trading simulation day, the test's date is set to the current trading day while the instrument date is set to the previous trading day. This prevents the creation of postdictive errors or errors where trading system logic is allowed to access information that is not available in actual trading.  In effect, postdictive errors are errors which rely on seeing the future.

 

Links:

 

See Also:

 

 


Edit Time: 3/16/2022 6:35:09 PM


Topic ID#: 617

 

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