[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [EquisMetaStock Group] Help with creating 2 Momentum Indicators



PureBytes Links

Trading Reference Links

Hi Cholrton,

 

The indictor that you are describing is called a Price Oscillator and is available stock standard in Metastock.

The only thing you can’t do with it is apply a moving average to the Price Oscillator indicator output, that is unless you create your own custom indicator.

Below is some code that will allow you to achieve this.

 

Pd1:=Input(“Short MA Period”,1,50,3);

Pd2:=Input(“Long MA Period”,5,100,9);

Pd3:=Input(“Oscillator MA Period”,5,100,16);

Osc:=OscP(Pd1,Pd2,E,$);

OMA:=Mov(Osc,PD3,E);

Osc;OMA;

 

Regards,

Tim Hyder

-------------------------------------------------------

A successful man is one who can build a firm

foundation with the bricks that others throw at him.

 

David Brinkley

-------------------------------------------------------


From: equismetastock@xxxxxxxxxxxxxxx [mailto:equismetastock@xxxxxxxxxxxxxxx] On Behalf Of chorlton_c_hardy
Sent: Friday, 14 October 2005 02:47
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group] Help with creating 2 Momentum Indicators

 

Hi All,

Can anyone help me !!!

I want to create a new oscillator in Metastock, which will contain 2
lines as momentum indicators and would welcome any help regarding
creating these.

The basic idea is that I want to plot a line, which is the result of
one Moving Average deducted from another Moving Average and plot the
net result (either a positive or negative number) as a line on the
chart.

The formula for the 1st line on the Oscillator should be:

3 day MA of closing price minus 9 day MA of closing price

(if this is working properly then hopefully the line should rise
above the horizontal 0, if the price over the last few days has been
moving up faster than the price for the last couple of weeks &
obviously below it if it hasn't)


The 2nd line on the Oscillator should be:

16 day MA of the 1st Oscillator line (which has just been plotted)


Can anyone help me in putting this all together :-/  as my current
knowledge of Metastock is limited.


Many Thanks in advance,

Chorlton









SPONSORED LINKS
Business finance course Business finance online course Business finance class
Small business finance Business finance schools Business finance small software


YAHOO! GROUPS LINKS