Help in writing metastock explorer writer.

#1
Hi all,

I am a novice in easy language for that matter novice in programming metastock.

I am required to make an explorer using the explorer tool in metastock where in I simply check that today's trading price of the security and compare it with the jan 1st 2009 Opening price of that security.

In the explorer i have written in column A:

ref( OPEN, -49) // because today is 18th march and 49 trading session ago was 1st march//

Column B:

Close

filter:

colB>colA

Now as you peole have observed that i have used the "ref" function and the hardcoded "49" which on the next day will become "50" and so and so forth.

Can any one tell me how to write a function in column A to get the opening price on 1st jan 2009.

Many many thanks in advance.

Vipin.
 
#2
You can easily do this in MetaStock:

Use the following:

ValueWhen(1,(DayOfMonth()=1 AND Month()=1 AND Year()=2009),O)

instead of ref( OPEN, -49)
 

Similar threads