DaysFromDate

DaysFromDate ( IDataHolder fromDate );

Description

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

Input parameters

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

Example

input BeginDate = 20090101;

plot Price = if DaysFromDate(BeginDate) >= 0 and DaysFromDate(BeginDate) <= 50 then close else double.NaN;

This example script draws the close plot for bars in the 50 days interval starting from BeginDate.