The function dow states the days of the week are like that
Day of week of the given bar, MONDAY (1), TUESDAY (2) ... SUNDAY (7).

But actually the weeks starts with
SUNDAY(1), MONDAY(2)....

Code:
#include <profile.c>
 
function run()
{
	 
	set(LOGFILE);
	BarPeriod =5;
 
	static int cur_day = 0  ;
 	 
 	if ( ldow(ET,0) != cur_day){ 
	    cur_day = ldow(ET,0);
	 
 		print (TO_LOG,"ldow() %d", ldow(ET,0));
  	} 
}


Last edited by dr_panther; 09/12/16 22:15.