# MetaStock Exploration Formula

#### chartzone

##### New Member
Respacted Traderji & Seniors MS user,

I am new user of MetaStock pro 9.0

Please give me the MS Exploration Formula for example given below,

1st Day = 29/03/2006
2nd Day = 30/03/2006
3rd day = 31/03/2006

I want formula for below condition,

** 2nd Day's close > 1st Day's close and 2nd Day's volume > 1st Day's volume and 3rd Day's close > 2nd Day's close and 3rd Day's volume < 2nd Day's volume**

& Please let me guide from where I can learn MetaStock Formula Language,

I will be very Thankfull to you,

Prakash(chartzone)

#### Debraj

##### Member
Hi Prakash,

You can start learning the MSFL by downloading the Equis Formula Primer from http://www.equis.com/Customer/Resources/. Also study the MS manual. Become a member of the official Equis Metastock Forum and of the Equismetastock Yahoo group, and study the formulas posted there.

As for the formula you have requested:

ref(c,-1)>ref(c,-2) {2nd Day's close > 1st Day's close}

and ref(v,-1)>ref(v,-2) {2nd Day's volume > 1st Day's volume}

and c>ref(c,-1) {3rd Day's close > 2nd Day's close}

and v<ref(v,-1) {3rd Day's volume < 2nd Day's volume}

Regards,

Debraj

#### chartzone

##### New Member
Debraj said:
Hi Prakash,

You can start learning the MSFL by downloading the Equis Formula Primer from http://www.equis.com/Customer/Resources/. Also study the MS manual. Become a member of the official Equis Metastock Forum and of the Equismetastock Yahoo group, and study the formulas posted there.

As for the formula you have requested:

ref(c,-1)>ref(c,-2) {2nd Day's close > 1st Day's close}

and ref(v,-1)>ref(v,-2) {2nd Day's volume > 1st Day's volume}

and c>ref(c,-1) {3rd Day's close > 2nd Day's close}

and v<ref(v,-1) {3rd Day's volume < 2nd Day's volume}

Regards,

Debraj

Thank you very much for your help Debraj

#### bluesea

##### Member
dear debraj,
i am writting an xprt. i usd differnt logic for buy/sell signal and stop. now my problem is i want that 'stop' signal should come after generation of either buy or sell signal. but since the logic is different the stop often comes when ther is no buy/ sell signal before that. this is making the xpert confusing.
i wnt stop signal should only generate when there is a buy/sell signal preceeding that.

regards

#### Debraj

##### Member
Hi bluesea,

You will need to use Roy's latch for this.
......................................................................................................

init:=Cum(set+reset>-1)=1;

......................................................................................................

Alternatively, you can download the free ForumDLL from http://forum.equis.com/. You will need to register (free). Go to MetaStock Online Group Forum Index -> Forum Downloads -> Stable Release -> Forum Dll. Also download the manual. By using the dll you will be able to get rid of unwanted signals too.

Regards,

Debraj

#### bluesea

##### Member
thanks for ur reply, debraj. . hwever, i am little confused b'coz of the last two lines. i would be highly obliged if u state spcifically what to write for buy/sell and for stop, separetly

regards

bluesea

#### Debraj

##### Member
Hi bluesea,

It is not clear from your first post whether you are using the same condition to exit a buy and a sell. Assuming they are different, these are the expert symbols:
........................................................................................................

init:=Cum(set+reset>-1)=1;

......................................................................................................

init:=Cum(set+reset>-1)=1;

............................................................................................

SELL:

set:= your sell formula;

reset:=your sell exit formula;

init:=Cum(set+reset>-1)=1;

....................................................................................................

SELL EXIT:

set:= your sell exit formula;

init:=Cum(set+reset>-1)=1;

.............................................................................................

Regards,

Debraj

#### bluesea

##### Member
dear debraj

thankx for your prompt reply. i thnk my problem will certainly be sorted out with ur generous advice. by the way i hv dn loaded the dll.
regards
bluesea

#### soumya_b

##### Active Member
hi debraj,

could u pls help me how to import .dll formula file into MS?
best regards,
soumya

#### Debraj

##### Member
Hi soumya,

Just put it in the External Function DLLs folder. Usually located C-> Program files-> Equis->Metastock. Restart MS to register.

To use it go to Paste functions. Scroll down left window (Function category).
Highlight dll. Function(s) will be available in the right window.

Regards,

Debraj