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.