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

Notification

Icon
Error

Options
Go to last post Go to first unread
RUAGOODP  
#1 Posted : Thursday, September 29, 2005 2:18:42 AM(UTC)
RUAGOODP

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2005(UTC)
Posts: 87
Location: perth australia

Hi Jose, Why is Roy's Weekly MACD - Close appear different to your Weekly MACD - Close on a daily chart. Please excuse my ignorance but I am just trying to understand. Below is roy's cde for weekly macd - close: {Weekly MACD - Close} {2004 Roy Larsen, rlarsen@man.quik.co.nz} {for use on daily charts with Jose Silva's "Calendar Week counter"} N:=Input("Weekly MACD Signal Periods",1,19,9); F:=Input("End of Week, 5=Friday 6=Saturday 7=Sunday",5,7,5); Q:=Input("Display Mode, 0=Static 1=Dynamic 2=Test",0,2,2); {0=Display, update on Friday when possible} {1=Display, update on each new bar} {2=Backtest, update on first bar of new week} G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5); I:=Fml("JOSE CALENDER WEEK COUNTER"); I:=Abs(I-ValueWhen(2-G,1,I)); M:=G OR I>0; F:=G OR (DayOfWeek()=F AND I=0); A:=LastValue(Cum(1)-1)=Cum(1); B:=ValueWhen(2,1,A); J:=If(F,1,If(Alert(F,2)=0 AND M,2,0)); J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J); J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J)); K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C))); K:=ValueWhen(1,K>0,K); X:=0.15; Y:=0.075; N:=2/(N+1); X:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-X)+K*X); Y:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-Y)+K*Y); R:=X-Y; Z:=If(Cum(J>0)=1,R,ValueWhen(1,J,PREV)*(1-N)+R*N); R; {MACD} Z; {Signal} Cheers Norman
Jose  
#2 Posted : Thursday, September 29, 2005 10:14:46 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Good question, Norman. 1) The first & main difference is that Roy uses the standard (and fixed) 0.15 & 0.075 exponential fractions for the construction of the two MACD EMA components, whereas I prefer to allow the user to select periodicity for these two. 2) My version of the weekly indicators all update on the Friday (close of week), whereas Roy's code waits until Monday before updating. 3) Roy & I differ on the way that the indicators should behave when there isn't enough data at the start of a chart. I prefer to reduce periodicity to the available bars - I'm not sure how Roy goes about this. 4) My version incorporates a choice for histogram output - not a big deal. 5) "JOSE CALENDER WEEK COUNTER" - If this is the same code as the "Calendar Week counter", then the start of week signals will be identical for both indicators. Vive le difference. :) jose '-) http://www.metastocktools.com
mstt  
#3 Posted : Thursday, September 29, 2005 6:58:29 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Normon I don't think "whereas Roy's code waits until Monday before updating" is quite correct. My formulas have an option to update on Friday when a Friday bar is present, and they also have the option of making the current week dynamic. Jose's formulas have the ability to identify the end of each week with or without Friday, and now that Jose has come up with a way to do that using PeakBars() my formulas will be modified to do likewise in due course. The difference is visual and shouldn't affect the results from explorations or back-testing. Other differences are more a matter of style than substance. I think it would be fair to say that both Jose and I have made a contribution to the "art" of applying weekly indicators to EOD charts. Roy
RUAGOODP  
#4 Posted : Monday, October 3, 2005 7:46:06 AM(UTC)
RUAGOODP

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2005(UTC)
Posts: 87
Location: perth australia

Thank you Roy and Jose for clearing things up Cheers Norman :D
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.