# Metastock Formula

#### lakefire12

##### New Member

I want to know whether anybody can write Trading Systems (Metastock Formulas) for a particular parameter. Thank You

##### Moderator
lakefire12 said:

I want to know whether anybody can write Trading Systems (Metastock Formulas) for a particular parameter. Thank You

#### lakefire12

##### New Member
Hi,
These are my requirements.

"cross of the 5 period exponential moving average of the close above the 6 period exponential moving average of the open for a BUY signal amd vice versa for a SELL signal. The signal Should show as UP arrow and Down Arrow marked in different colours.

If you can help me That will be great. Thanks in advance.

Lakefire Expert

X:=Mov(C,5,E);

Y:=Mov(O,6,E);

Cross(x,y)

Sell Arrow :

X:=Mov(C,5,E);

Y:=Mov(O,6,E);

Cross(y,x)

#### chheda

##### Member
lakefire12 said:
Hi,
These are my requirements.

"cross of the 5 period exponential moving average of the close above the 6 period exponential moving average of the open for a BUY signal amd vice versa for a SELL signal. The signal Should show as UP arrow and Down Arrow marked in different colours.

If you can help me That will be great. Thanks in advance.
Hi

buy:=Cross( Mov(C, 5, E ) , Mov(O, 6, E )) ;
sell:=Cross( Mov(O, 6, E ) , Mov(C, 5, E )) ;

Harish

#### lakefire12

##### New Member
Hi,
I need something like it is in the Sample.gif with the bars turning Blue from the buy signal and turning Red from the sell signal along with the arrows and the text. The text should be in the colour of the arrows. No need for the moving average to be shown on the chart

The moving averages plotted are "5 Exponential Close" is in Blue and "6 Exponential Open" is in Red. Hope somebody can help me. THIS FORMULA IS FOR EXPERT ADVISOR. Thank You

#### Attachments

• 13.6 KB Views: 4,742
Last edited:

##### Super Moderator
Open Metastock, Click on Tools->Expert Advisor->New and enter whatever name you want to give.

Then Click the Highlights tab -> New -> enter Bullish as name. Under condition add:
Mov(C, 5, E ) > Mov(O, 6, E ), Select colour as Blue. Click Ok.

Then similarly add an another condition under Highlights called Bearish under it add:
Mov(O, 6, E ) > Mov(C, 5, E ), select colour as Red and click ok.

For the BUY and SELL arrows:

Add the following two conditions under Symbol.

Cross( Mov(C, 5, E ) , Mov(O, 6, E ))

Select the appropriate symbol.

SELL

Cross( Mov(O, 6, E ) , Mov(C, 5, E ))

Select the symbol.

Click ok -> ok.

TO display this expert advisor, open any chart, then right click, select Expert Advisor -> Attach. Select the Expert Advisor you had jus made then click on Ok.

#### soumya_b

##### Active Member
what is the metastock Explorer formula to find 52 week high/low. waiting for

best regards,
soumya.b

##### Super Moderator
soumya_b said:
what is the metastock Explorer formula to find 52 week high/low. waiting for

best regards,
soumya.b
You can use this formula as an exploration:

New 52 Wk HIGH
if(h>ref(hhv(h,250),-1),h,0)

New 52 Wk LOW
if(l<ref(llv(l,250),-1),l,0)