Returns the bar index of the date and time. This bar index synchronizes with the instrument.bar. To find the close for a bar Index returned, subtract from instrument.bar and use as a lookback index.

 

Note:

Function will returns -1 when the date and or time cannot be not found in the instrument series.

 

Syntax:

barIndex = instrument.GetDayIndex( date, time )

 

Parameter:

Description:

date

The date in YYYYMMDD format.

time

The time in HHMM format.

 

Example:

barIndex = instrument.GetDayIndex( 20060101, 1130 )
 
IF barIndex <> -1 THEN
  barClose = instrument.close[ instrument.bar - barIndex ]
  barDate = instrument.date[ instrument.bar - barIndex ]  
ENDIF
 
PRINT barClose, barDate

Returns:

Displays the close price and date-time values of the specified instrument record.

 

Links:

Data Functions

See Also:

 

 


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


Topic ID#: 350

 

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