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

RE: [EquisMetaStock Group] Re: help needed



PureBytes Links

Trading Reference Links

My version of Metastock is 6.52 and I guess ISUNDEFINED function is added-on in the latter versions. Is there a way to manually define it as a function?
-----Original Message-----
From: Jose Silva [mailto:josesilva22@xxxxxxxxx]
Sent: Wednesday, March 30, 2005 8:29 PM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group] Re: help needed


Zeki, the MetaStock equivalent of ISNA is the IsUndefined() function.
ISNA:=IsUndefined(BarsSince(Cross(RSI(14),25)));

Unfortunately, the null (N/A) bars are persistent in MetaStock, so
it's best to try and remove them at the source:

================
Null bar removal
================
---8<--------------------
{ Removes Null periods from condition,
  but not from indicator }

condition:=Cross(RSI(14),25);
ISNA:=IsUndefined(BarsSince(condition));
Init:=Cum(IsDefined(condition))=1;

If(ISNA,0,BarsSince(condition OR Init))
---8<--------------------


jose '-)
http://www.metastocktools.com



--- In equismetastock@xxxxxxxxxxxxxxx, "Zeki Muderrisoglu"
<zmuderrisoglu@xxxx> wrote:
> I keep getting N/A in some stocks in an explorer I'm working on and
the problem is not about loaded data periods. It's just that the
criteria is not met. I'd like to know is there is a command like ISNA
or ISERROR in Metastock like excel so that I can formulate an IF
statement like this;

> IF(Cross(RSI(14),25)="N/A",500,BarsSince(Cross(RSI(14),25))) or

> IF(Cross(ISNA(RSI(14),25)),BarsSince(Cross(RSI(14),25)))

> Thanks for your help.
> Zeki.





Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links