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

[EquisMetaStock Group] Problem with if and isUndefined



PureBytes Links

Trading Reference Links

Hi everybody,

I'm currently trying to write a system tester for the Triple Screen 
Trading system from Dr. Elder.

I'm having a problem with assigning a value when IsUndefined is true.

At some point, I need to compute how long the weekly MACD histogram 
has been under 0.

So this is what I wrote,

nbBarsSinceBelowZero := 
If( IsUndefined(BarsSince(Fml("Wkly MACD Histogram")>0)),
    10000,
    BarsSince(Fml("Wkly MACD-Histogram")>0));

When I plot the variable nbBarsSinceBelowZero, there is a large gap 
at the beginning of the graph i.e. nbBarsSinceBelowZero is also 
undefined but I would expect it to have a value of 10000 instead.

However if I write

If( IsUndefined(BarsSince(Fml("Wkly MACD Histogram")>0)),
    10000,
    0);

I get 10000 at the beginning where I was getting no value and then a 
lot of 0. So this is clearly a bug in MetaStock.

Does anybody have a work around for that problem? 

Thank you,
Stephane




------------------------ 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/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/