PureBytes Links
Trading Reference Links
|
Joe, Let me jump in and share the formula that I use that matches Trade
output exactly. The Adv Decl symbols are from the FastTrack database;
substitute your own symbols.
Ken
/* Nas Summation KSC 3/17/03 */
//Compute Nas advance/decline, McClellan oscillator AND summation
nadv = Foreign("advq","C");
decl=Foreign("declq","C");
nyad = (nadv - decl) / 100 ;
StartDate = IIf(DateNum() == 900102, 1, 0);
NumDays = BarsSince(StartDate);
NS_McClellan_Osc = 100 * (EMA(nyad, 19) - EMA(nyad, 39)) ;
NS_McClellan_Sum =Foreign("NSMCS","C");
NS=Sum(NS_McClellan_Osc, NumDays) + 40.32178;
//Plot(NS_McClellan_Osc, "NSMCO", 5);
Color=IIf(NS_McClellan_Sum<1000,4,5);
Plot(NS_McClellan_Sum, "NSMCS", Color, 2);
Plot(NS_McClellan_Sum, "NSMCS", 2, 1);
Plot(1000,"",0,1);
Plot(NS+100,"NS",6,1);
GraphXSpace=3;
-----Original Message-----
From: Joseph Landry [mailto:jelandry@xxxxxxxxxxxxx]
Sent: Friday, October 03, 2003 11:21 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] McClelland Summation
Steve Almond -
I need some help with the McClelland Summation forumla. I'd like to
use it some Trade routine that I'm trying to convert to AFL but not
getting consistent results. I'd like to calculate something called
the Beasley Scorecard.
I noted in a message on Sept 20 that you posted a ratio adjusted
summation index that is consistent with StockCharts' values,
a=Foreign("$ADV","C");
d=Foreign("$DECL","C");
t5=EMA((a-d)/(a+d),39);
t10=EMA((a-d)/(a+d),19);
Summ = 1000*((t10-t5)-(10*t10)+(20*t5));
Plot(Summ,"Summation NYSE",1,1);
but -
TJ and others have used the McClelland Summation formula in the AFL
formula file as follows and like what I've seen in the TRADE
routines.
Summ = Cum(EMA(AdvIssues()-DecIssues(),19) - EMA(AdvIssues()-
DecIssues(),39));
My understanding was that the summation started with a value of 1000
back many years ago and accumulates from there, so this would not be
correct either? Would having the first value of this array as 1000
be correct?
Would appreciate any help? and if someone on the FORUM has converted
the Beasley scorecard from TRADE I would appreciate help there also
- except for this calculation I'm almost there.
Best regards
JOE
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|