Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 7/15/2006(UTC) Posts: 2
|
{ User input } type:=Input("OHLC values: [1]Day, [2]Week, [3]Month, [4]Year",1,4,1);
{ Day's start } DayStart:=DayOfMonth()<>Ref(DayOfMonth(),-1);
{ Week's start - reference "Calendar Week counter" indicator for accurate weekly signals} WkStart:=DayOfWeek()<Ref(DayOfWeek(),-1);
{ Month's start } MthStart:=Month()<>Ref(Month(),-1);
{ Year's start } YrStart:=Year()>Ref(Year(),-1); <---- Instead of Yearly, I want to get quarterly ???
{ Selected Daily/Weekly/Monthly/Yearly } start1:=If(type=1,DayStart, If(type=2,WkStart, If(type=3,MthStart,YrStart))); start:=start1 OR Cum(1)=2;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/1/2006(UTC) Posts: 135 Location: Romania
|
{quarterly start}
qstart:=frac(month()/4)<>0 and ref(frac(month()/4),-1)=0;
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.