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

Re: [amibroker] FibCMO strangeness



PureBytes Links

Trading Reference Links

Hi Herman,

Sunday, August 24, 2003, 8:22:30 PM, you wrote:

HvdB> This appears to happen when you divide by zero, i.e when C
HvdB> doen't change for a few bars.

Was strange, because I can only find a very small number of issues
that had this problem, yet none of them seemed to have unchanged
closes during the periods in question.

Nonetheless, your suggestion, implemented as below, seems to work:

Title="FibCMO";

FibCMO=(100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),3))-(Sum(IIf
(C<Ref(C,-1),(Ref(C,-1)-C),0),3)))/((Sum(IIf(C>Ref(C,-1),(C-Ref
(C,-1)),0),3)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),3))))+100*
((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),5))-(Sum(IIf
(C<Ref(C,-1),(Ref(C,-1)-C),0),5)))/((Sum(IIf(C>Ref(C,-1),(C-Ref
(C,-1)),0),5)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),5))))+100*
((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),8))-(Sum(IIf
(C<Ref(C,-1),(Ref(C,-1)-C),0),8)))/((Sum(IIf(C>Ref(C,-1),(C-Ref
(C,-1)),0),8)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),8)))))/3;

FibCMO = Nz(FibCMO);

Plot(FibCMO,"",1,1);

Plot(TEMA(FibCMO,11),"",7,1);

PlotGrid(60, Color = colorDefault );
PlotGrid(-20, Color = colorDefault);

Thanks,

Yuki


------------------------ 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/l.m7sD/LIdGAA/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/