logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dion  
#1 Posted : Tuesday, December 12, 2006 4:51:45 PM(UTC)
dion

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/12/2006(UTC)
Posts: 2

Hi,

I would like to look for stocks which today’s close breakout the 2 resistances (longer and shorter), so I run the exploration…

COLA:(RES_LONG)

IF(Cross(CLOSE, Fml("resistance (longer term) <auto>")),1,0)

COLB:(RES_SHOR)

IF(Cross(CLOSE, Fml("resistance (shorter term) <auto>")),1,0)

COLC (RES_BOTH)

IF(Cross(CLOSE, Fml("resistance (longer term) <auto>")),1,0) +

IF(Cross(CLOSE, Fml("resistance (shorter term) <auto>")),1,0)

If cola = 0 and colb=0 => colc =0

If cola = 1 and colb=0 => colc =1

if cola = 1 and colb=1 => colc =2....

BUT

If cola = 1 and colb=N/A => colc = 0

OR

If cola = N/A and colb=1 => colc = 0 !!!

So my question is "Is there a way to make the addition between a number and a N/A result? Or another way to recognize the result “N/A” likes a “zero”, in order to get the correct result?"

Thanks for your help

mstt  
#2 Posted : Tuesday, December 12, 2006 5:33:08 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Dion

There are a number of ways to force a zero plot instead of N/A in an exploration report. Some methods require the code causing the problem to be fixed. A generic "fix" that should work regardless of the state of your existing code is to use the Forum DLL as the output mechanism for each column. Assuming your current column results are named "output" it would work something like this.

Output:=xyz;

ExtFml("Forum.Sum",Output,1)

Roy

MetaStock Tips & Tools

dion  
#3 Posted : Wednesday, December 13, 2006 1:36:15 AM(UTC)
dion

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/12/2006(UTC)
Posts: 2

Thanks Roy, your comment is greatly appreciated...

Dion

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.