logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
uasish  
#1 Posted : Monday, September 10, 2007 8:39:32 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times

{Courtesy to Roy & Mark Pyle's GV}

{Find the last Thursday in the Month}
d:=4; {Thursday}

leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0 OR Frac(Year()/400)=0;
m:=Month();

maxDaysinMonth:=
If(m=1 OR m=3 OR m=5 OR m=7 OR m=8 OR m=10 OR m=12,31,
If(m=4 OR m=6 OR m=9 OR m=11,30,28+leap));

a:=DayOfWeek()=d AND (maxDaysinMonth-DayOfMonth())<7;
a1:= If(Cum(a)=22,1,0);
a2:= If(Ref(a1,-1)=0 AND a1=1,1,0);
a3:=If(Ref(Cum(a)=11,-1)=0 AND Cum(a)=11,1,0);
profit:= Fml( "Signal Mimi Long-2 System's Profit Long %") ;
zz:= Highest(Max(Highest(profit),0)-profit);
zz;

.........................................................................................................

As Indian Future mkt the settlement day is the last Thusday of the month can this be used as CAGR,seniors plz confirm.

Asish

uasish  
#2 Posted : Thursday, September 13, 2007 8:31:02 AM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
I have been indebted so much to Roy / Jose / Wabbit etc following their codes that sometimes i loose track & their way of tackling a variable or expression gets reflected inadvertently. For the above CAGR i should actually express my courtesy to Jose.
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.