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

Re: [amibroker] Code for smoothing



PureBytes Links

Trading Reference Links




Keith,
 
There are many choices for smoothing filters that 
can be applied.....
 
here is one way.... ( DEMA ) 
 

//{Chande's Momentum Indicator}
CMI=100 * 
((Sum(<FONT 
color=#0000ff size=2>IIf(C><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1),(C-<FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)),<FONT color=#ff00ff 
size=2>0),<FONT color=#ff00ff 
size=2>14)) - 
(Sum(<FONT 
color=#0000ff size=2>IIf(C<<FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1),(<FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)-C),<FONT color=#ff00ff 
size=2>0),<FONT color=#ff00ff 
size=2>14))) / 
((Sum(<FONT 
color=#0000ff size=2>IIf(C><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1),(C-<FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)),<FONT color=#ff00ff 
size=2>0),<FONT color=#ff00ff 
size=2>14) + 
(Sum(<FONT 
color=#0000ff size=2>IIf(C<<FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1),(<FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)-C),<FONT color=#ff00ff 
size=2>0),<FONT color=#ff00ff 
size=2>14))));
Plot(CMI,<FONT color=#ff00ff 
size=2>"CMI",colorRed,styleLine);<FONT 
face="Courier New" color=#0000ff size=2>
Plot(<FONT face="Courier New" 
color=#0000ff size=2>DEMA<FONT face="Courier New" 
size=2>(Cmi,<FONT face="Courier New" color=#ff00ff 
size=2>10),<FONT 
face="Courier New" color=#ff00ff size=2>"d-CMI"<FONT 
face="Courier New" size=2>,colorBlue,styleLine);<FONT face="Courier New" 
color=#ff0000 size=2>//Smoothed CMI
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Keith 
  Newhouse 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, June 15, 2003 10:13 
PM
  Subject: [amibroker] Code for 
  smoothing
  Hi all,I am looking for help with code for 
  smoothing Chande's Momentum Indicator, details of which are below.  
  If some one can show me how to apply smoothing I would be 
  grateful.Also does anyone have the code, or know where I can find 
  it,  for VEL, a smoothed momentum indicator. I understand it has been 
  coded in AFL although I cannot find it in the 
  libary.Regards,Keith.//{Chande's Momentum 
  Indicator}CMI=100 * ((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),14)) - 
  (Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),14))) / 
  ((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),14) + 
  (Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),14))));Plot(CMI,"CMI",colorRed,styleLine);
  Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  
<BLOCKQUOTE 
><FONT 
  face="Courier New">---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.489 
  / Virus Database: 288 - Release Date: 
6/10/2003






Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.