PureBytes Links
Trading Reference Links
|
You're out of luck with coding the IsUndefined() in earlier versions
of MetaStock, but you're not missing much anyway.
Here is some MS code that approximates the IsDefined() function:
---8<--------------------
condition:=BarsSince(Cross(RSI(14),25));
IsDef:=Cum(condition)>-1;
IsDef
---8<--------------------
jose
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, "Zeki Muderrisoglu"
<zmuderrisoglu@xxxx> wrote:
> 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@x...]
> 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 --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|