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

[EquisMetaStock Group] Re: Problem with if and isUndefined



PureBytes Links

Trading Reference Links

By the way I'm using MetaStock EOD 8.01

--- In equismetastock@xxxxxxxxxxxxxxx, "stephanegranger_2000" 
<grangers@xxxx> wrote:
> 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/