Traders Laboratory - View Single Post - Allocating Trading Day Number
View Single Post
  #2 (permalink)  
Old 02-16-2008, 09:16 AM
thrunner thrunner is offline
thrunner has no status.

 
Join Date: Feb 2007
Posts: 176
Thanks: 58
Thanked 46 Times in 25 Posts
Re: Allocating Trading Day Number

if Month( date ) <> Month( CalcDate( date, iff( DayOfWeek( d ) <> 5, 1, 3 ) ) ) then print( date ) ;
Quote:
The CalcDate function adds and subtracts days from a reference date. The reference date is a numeric value in the EasyLanguage date format: YYYMMDD (Year Month Day).

For example, 1030101 = Jan. 1st, 2003 or 9906015 = June 15, 1999

Since EasyLanguage and Chart Analysis use this special date format, it is sometimes difficult to add or subtract some number of days from the EasyLanguage date. For example, if you wanted to subtract 15 days from Jan 1, 2003, you might try 1030101 – 15, which would result in an invalid date, CalcDate solves this by returning the correct and valid date of 1021216

Syntax
CalcDate(RefDate,DaysChan ge)

Returns (Integer)
A numeric value the represents the date in EasyLanguage format for the current bar.

]

Reply With Quote