[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DAYOFWEEK()



PureBytes Links

Trading Reference Links


The following formula gives the first and the last 
trading
day of a week.
As for the last week, everyday is the last 
day.
(You never know if "Domani ever comes", asFrank 
Sinatra
was singing more than 30 years ago. 
Pablo Picasso, after a<FONT face=Arial 
size=2> hard working 18 h day,
left the rest of the painting for 
tomorrow
and a tiny note in a corner about tomorrow´s 
scedule.
A 3 years little girl in NY is still waiting for 
her daddy.
Last night he said "I´ll be there 
tomorrow".
And so on...)
 
/*FORMULA FOR THE FIRST AND THE LAST 
TRADING
DAY OF A WEEK*/
FIRST=dayofweek() < 
ref(dayofweek(),-1);graph2=FIRST;LAST1=HIGHESTSINCE(FIRST==1,DAYOFWEEK(),1);LAST=IIF(LAST1<REF(LAST1,1),0,1);GRAPH1=LAST;GRAPH1STYLE=2;
 
If you want to have this fact for a condition, 
use
FIRST==1;
for the first day and
LAST==1;
for the last trading day of a week.
 
Dimitris Tsokakis