DaysTillDate

DaysTillDate ( IDataHolder tillDate );

Description

Returns the number of days till the specified date. Note that the tillDate argument is specified in the EST timezone and has the YYYYMMDD format.

Input parameters

Parameter Default value Description
tillDate - Defines the date until which days are counted, in the YYYYMMDD format.

Example

input EndDate = 20090101;

plot price = if DaysTillDate(EndDate) >= 0 and DaysTillDate(EndDate) <= 50 then close else double.NaN;

The example draws the close plot for bars in the 50 days interval ending on EndDate.