MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx]
On Behalf Of Kevin Johnson
Sent: Thursday, February 01, 2001 3:26 PM
To: metastock@xxxxxxxxxxxxx

I'm just learning MS's formula language. To this end I've been working on simple exercises to get my feet wet.

I'm currently attempting to write a bit of code (for a MS Expert) that as part of the Expert's criteria, requires that the ADX be rising.

I thought perhaps I could accomplish this by writing:
(in non-code language, for example's sake)

"want current ADX to be greater than the ADX 5 bars ago and ADX 5 bars ago to be greater than ADX 10 bars ago, etc."

I suppose I could do this using the "ref" function, i.e...

...and just keep stacking the prior periods (-5, -10, etc).

This would ensure that the ADX is rising, but I'm sure there is a more elegant way to pull this off, and perhaps with more control over the slope of the ADX.

Any ideas?

As many people that there are with opinions on this, I believe that there are just as many solutions.

Here are some of my ideas:

Moving averages are another way to guage trend. You can compare the ADX() with a Moving average of itself. Do consider the lag in this sort of a system, and determine if it fits with the type of trading you are doing. If a line remains above a moving average, it is trending up. You could use

Sum(ABOVE,20)=20;

I'm using 5 periods and 20 bars for the test just as an arbitrary example. So these are just some of many ways to approach this problem. I'm sure other listmembers will have additional ideas.

Fort Collins, CO

Re: Trending vs. Consolidating Markets
To: metastock@xxxxxxxxxxxxx
Subject: Re: Trending vs. Consolidating Markets
From: Pierre Tremblay <pt2000@xxxxxxxxxxxxxxxx>
Date: Tue, 06 Feb 2001 02:14:53 -0500
Sender: owner-metastock@xxxxxxxxxxxxx

I like to use rate of change (ROC) of a moving average to see if a stock is in a trend and the strength of this trend.

Like, if I use a 30 periods simple moving average and I want to select only a minimum upside trend of 0.8 % by day, I will have :

ROC(Mov(C,30,S),1,%) > 0.8

Pierre Tremblay

[448]
Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.