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

RE: [amibroker] C2 Indicator - Graham



PureBytes Links

Trading Reference Links

Keith, you had me scratching my head over that one for a short while,
assuming also I was the Graham you were referring to
Is this the one you mean. Haven't done much with this one for a while. (I
also have A,B,C,D,E,F with derivatives of some of these. A couple almost
worth some further work)

//INDICATOR C 2
//Momentum
//by Graham Kavanagh 09 June 2003

Period1 = 40;
Period2 = 20;
Period3 = 5;

Rise = IIf(H>Ref(H,-1) AND L>Ref(L,-1),1,0);
Fall = IIf(H<Ref(H,-1) AND L<Ref(L,-1),1,0);

CountRise = Sum(Rise,Period1);
CountFall = Sum(Fall,Period1);

IndC = (CountRise-CountFall)/Period1*100;
MAIndC = DEMA(IndC,Period2);
Trigger = EMA(MAIndC,Period3);

Strengthup = MAindc - ValueWhen(Cross(maindc,trigger),MAindc);
Strengthdn = MAindc - ValueWhen(Cross(trigger,maindc),MAindc);
Strength = DEMA( (strengthup+strengthdn), period2 );
MAstrength = EMA(Strength,5);

GraphXSpace = 2;
mycolor=IIf(MAIndC>Trigger, colorGreen,
IIf(MAIndC<Trigger,colorRed,colorBlack));

Title =EncodeColor(SelectedValue(mycolor)) + Name() + " " + Date() + " Ind
C2 Trend Strength: Higher Highs & Lows - Lower Highs & Lows:
"+WriteVal(period1,1)+"/"+WriteVal(period1,2)+"/"+WriteVal(period3,1);

Plot( strength, EncodeColor(colorGreen)+" trend Strength ",  colorGreen,
styleLine+styleNoLabel);
Plot( mastrength, EncodeColor(colorRed)+" MA Strength ",  colorRed,
styleLine+styleNoLabel);


Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia


-----Original Message-----
From: Keith Bennett [mailto:kbennett@xxxxxxxxxx] 
Sent: Sunday, 21 September 2003 9:33 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] C2 Indicator - Graham


Graham,

Could you please tell me where I can find the afl for the C2 
Indicator which you referred to last June.

TIA
Keith



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 ---------------------~-->
Special Sale: 50% off ReplayTV
Easily record your favorite shows!
CNet Ranked #1 over Tivo!
http://us.click.yahoo.com/WUMW7B/85qGAA/ySSFAA/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/