Formula Help Required Please!

samshah19

Newbie
Messages
2
Likes
0
Hi Guys,

I am a new member to this forum and have been browing it since couple of weeks which has helped me a lot in terms of getting started with my metastock. Glad to see the support provided by all of you. Regarding my question I am trying to run an exploration query which can show results for close at (C,-1) has closed below it's 10 days weighted MA AND Yesterday's Close (C) has closed above the 10 days weighted MA.

The formula I was been given by Metastock Support team was
ref(C,-1)<Mov(C,10,W) AND C>Mov(C,10,W) --- which did not work as the close of (C,-1) is comparing it's value with Yesterday's MA not with it's value from two days ago. So I tried modyfying to:

Ref(C,-1)< Ref(Mov(C,10,W),-1) AND C>Mov(C,10,W)

which I though is right by looking at few other formula templates although this particular formula isn't working either -- infact when the run the explorer its not rejecting any securities..

Can anyone please help me with this? :confused:

Regards,
Sam
 
Hi Guys,

I am a new member to this forum and have been browing it since couple of weeks which has helped me a lot in terms of getting started with my metastock. Glad to see the support provided by all of you. Regarding my question I am trying to run an exploration query which can show results for close at (C,-1) has closed below it's 10 days weighted MA AND Yesterday's Close (C) has closed above the 10 days weighted MA.

The formula I was been given by Metastock Support team was
ref(C,-1)<Mov(C,10,W) AND C>Mov(C,10,W) --- which did not work as the close of (C,-1) is comparing it's value with Yesterday's MA not with it's value from two days ago. So I tried modyfying to:

Ref(C,-1)< Ref(Mov(C,10,W),-1) AND C>Mov(C,10,W)

which I though is right by looking at few other formula templates although this particular formula isn't working either -- infact when the run the explorer its not rejecting any securities..

Can anyone please help me with this? :confused:

Regards,
Sam

@Sam,

imho the last formula is correct. But I suggest, that you should implement your project step for step:

1. first try the construct with a simple example (like Ref(Mov(C,2,S),-1)), so you can control immediately whether that's what you really want to do!

2. then try to test extending this formula step for step and you will see results


bye,
zentrader
 
@ Zentrader thanks for your assistance, last night I tried plotting in the formula you provided:
Ref(C,-1)< Ref(Mov(C,10,W),-1) AND C>Mov(C,10,W) although it comes up with an error "')' expected" I tried changing few brackets in the formula but had no luck. from what you advised on breaking it down in parts I used tried using

Ref(C<Mov(C,10,W),-1) in conjunction with C>Mov(C,10,W) although I get the same issue it doesn't reject any securities in exploration

Can you please advise if I can try some other format as I think we're very close and I'd like to have this working for my strategy.

Please advise
Sam
 
...last night I tried plotting in the formula you provided:
Ref(C,-1)< Ref(Mov(C,10,W),-1) AND C>Mov(C,10,W)
although it comes up with an error...

Sam

Sam,

I've tried the formula in MS Explorer using the default securities and got a result (e.g. 4 securities have filled the criteria - column "Column..." = 1) - see attached gif-file.

So I think you have to control step for step where your specific problem is...

bye,
zentrader
 

Attachments

  • ms_explorer.gif
    ms_explorer.gif
    23.5 KB · Views: 336
Last edited:
Top