This script has Automatic Instrument Context by default.  This means, when this script section executes, it is given direct access to all IPV Properties and Functions.

 

Before Instrument Day runs once per day. If you want to run a script on every bar, use the Before Bar script section.

 

This Before Instrument Day section executes on every test date record in a data file for each instrument in the portfolio.  When a date record isn't in a symbol's data series, the information in the properties will be from the last date record in the symbol data.   where a date record exist and that instrument's property reports instrument.tradesOnTradeDate = TRUE when the amount of data required for its indicators to be primed shows the symbol property instrument.IsPrimed = TRUE.  

 

Execution for each instrument happens after the Before Trading Day script section completes execution.

 

Script can be an alternate location to calculate instrument-specific variables or custom indicators each day.  

 

Executing this script when the instrument does not have a date for the current instrument date being processed, the property value information will be from the most recent instrument date.

 

Use the instrument.tradesOnTradeBar property return value to determine if the instrument record being processed is for the current period, or an earlier period.  When instrument.tradesOnTradeBar return value is TRUE, the instrument information is current.  When it is FALSE, values available will be from the most recent price record.

 

Use the instrument.tradesOnTradeBar property when it is important to know, or to not allow calculation changes.

 

 


Edit Time: 9/12/2020 10:28:44 AM


Topic ID#: 164

 

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