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

Notification

Icon
Error

Options
Go to last post Go to first unread
termi21  
#1 Posted : Friday, June 1, 2007 4:21:53 PM(UTC)
termi21

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/15/2006(UTC)
Posts: 16

Hello, i am completely new to Metastock and i am trying to make a custom exploration.

1)What i want to do is to add a column(E) with the sums of the results of all the previous columns(A-D).

2)So is there a way to reference other columns' results in general?

3)Also, i would like "N/A" results to be treated as Zeros in this final sum

Thank you very very much in advance,

Termi

hayseed  
#2 Posted : Friday, June 1, 2007 5:57:18 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey termi21..... you will have difficulty referencing columns in an exploration other than in the filter section....

your best route would be to just put all prior columns code into column e in a manner that will add them all.....

without knowing what your adding, below will be a brief example......h


Exploration notes

Col A: > 10

C>Mov(C,10,S)


Col B: > 20

C>Mov(C,20,S)


Col C: > 30

C>Mov(C,30,S)


Col D: > 40

C>Mov(C,40,S)


Col E: total

a:=C>Mov(C,10,S);
aa:=C>Mov(C,20,S);
aaa:=C>Mov(C,30,S);
aaaa:=C>Mov(C,40,S);

a + aa + aaa + aaaa



Filter enabled Yes
Periodicity Daily
Records required 52

termi21  
#3 Posted : Friday, June 1, 2007 6:13:52 PM(UTC)
termi21

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/15/2006(UTC)
Posts: 16

Thank you for your fast reply. I' am hitting my head on the monitor 3 hours now trying to solve that problem. It is strange that you cannot reference columns. The first thing i tried was the solution you mentined but for some reason the Sum in tha last column wasn't correct. And this is where the nightmare begun :)

For example

Column A is set to give 0 or 5 (with "if" command)

Column B is set to give 0 or 10

Column C is set to give 0 or 20

Column D has all the previous formulas added together

The results i get are in some rows correct and in some wrong, for example

A.........B.........C...........D

5.........10........20.........35

5.........10........20.........15 (that means that in D, C was calculated as 0 instead of 20)

0.........0..........0...........10 (that means that in D, B was calculated as 10 instead of 0)

What is happening?

It drives me crazy!!! The only thing i can think of is that for some reason the formulas interfere with each other.

termi21  
#4 Posted : Friday, June 1, 2007 6:28:18 PM(UTC)
termi21

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/15/2006(UTC)
Posts: 16

Ok i see there is an important difference it our approaches. What i did was:

ColD:

formula1 + formula 2...

Yours

a= formula 1

aa= formula 2

a+aa ...

seems to confuse the program much less... i will tell in you the results in a minute.

Could you tell me how to convert some N/A results to 0s in Column D

If it A=5, B=10, C=N/A i want to get D=15 not N/A!

OK the constant assigning method worked like charm! Thank you so much!! I lost all my evening trying to adding the formulas directly without success.

Now only the N/A problem remains.

OK i used the forum.dll trick for that one.

Case solved! :)

Jose  
#5 Posted : Friday, June 1, 2007 8:34:37 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
termi21 wrote:
Now only the N/A problem remains.
There is a neat and dedicated solution for the sticky null problem here. jose '-)
Users browsing this topic
Guest (Hidden)
Similar Topics
Metastock explorer question (MetaStock)
by jasonlcl 2/1/2012 4:01:00 AM(UTC)
REFERENCE IN EXPLORER QUESTION FOR DOP (Formula Assistance)
by wdgigi 4/30/2008 5:37:02 AM(UTC)
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.