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

[amibroker] Re: Newbie AFL question



PureBytes Links

Trading Reference Links

Bill,

Try x=iif(h>l,(c-o)/(h-l),0);

jim


--- In amibroker@xxxxxxxxxxxxxxx, "zimm630" <zim630@xxxx> wrote:
> I have an indicator I use that is as follows and works fine, until
> X=(C-O)/(H-L);
> Graph0 = Cum(X);
> 
> When downloading some ETFs which I have been following on occasion 
> you have a day with no movement hence c=o=h=l and you have a zero 
in 
> either or both the numerator and denominator.
> If I do
> 
> IIF (H>L,X=(C-O)/(H-L),X=0)
> Graph0 = cum(x)
> The indicator just becomes a flat line and stays flat.
> 
> Any Ideas?
> 
> Thanks in advance for any help, and I wish everyone a happy 
> Thanksgiving.
> Bill


------------------------ 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/