Property returns a TRUE value when an instrument.date available to match a test.currentDate during the Brokerage, Fill, and Update Instrument scripts.  When the instrument skips a test.currentDate value this property will return a FALSE value.

 

NOTE:

Instrument property: tradesOnTradeDate has been obsoleted but it is still active.  When used it will provide the same information as instrument.tradesOnTradeBar, but at some point a Trading Blox Builder version release might remove it from the active instrument properties.  When reviewing blox where the previous property name is being used, it would be best to change to the current name to prevent unexpected script failures in future versions.

 

Image on the left shows simulation results where the script sections with normal instrument context do not execute when there is a gap in the instrument.date records relative to the test.currentDate.

 

Script sections, Exit Orders, Entry Orders, and Update Indicators don't execute when the most recent instrument record date will not match the test date.  

 

Script sections Initialize Risk Management and Compute Risk Adjustments don't have normal instrument context are shown because they are the default scripts associated with a Risk Manager blox.

 

When an script section with normal instrument context executes where its instrument date won't match the test date the instrument property values will be from the most recent previous instrument date that was able to match its companion test date.

 

Use this property as a control or an alert when it is calculating instrument information that is delayed by a gap in the current instrument dates.

Click to Enlarge, Click to Reduce

TradesOnTradeDate Test Report Example

 

Example:

'  -----------------------------------------------------
'  Prevent any instrument calculations when there
'  is a missing date gap between the current instrument
'  date and the executing test.currentDate
If instrument.tradesOnTradeBar THEN
  '  Perform normal instrument calculations.
  '  [  Do Something in this area  ]
ENDIF '  i.tradesOnTradeBar = TRUE  
 
'  -----------------------------------------------------
'  Change how instrument calculations are handled when
'  there is a date gap between latest instrument date and
'  current test date.
If instrument.tradesOnTradeBar = TRUE THEN
  '  Perform normal instrument calculations.
  '  [  Do Something in this area  ]
 
ELSE '  i.tradesOnTradeBar = FALSE
  '  Perform normal instrument calculations.
  '  [  Do Something ELSE, or nothing in this area  ]
 
ENDIF
'  -----------------------------------------------------

Returns:

True, or a 1 is returned only when there is an instrument record for the current test date.  

 

Links:

 

See Also:

Data Properties

 


Edit Time: 9/25/2017 09:09:54 AM


Topic ID#: 630

 

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