General Topics
Markets
Technical Topics
Brokerage Firms
Community Lounge
Site Support

# Formula for Calculating Slope of 200 Day Moving Average

Discussion in 'Trading' started by MAVERICK007, Aug 6, 2009.

1. ### MAVERICK007

The Slope of the 200 Day Moving Average seems to carry major importance in determing the direction of a long-term trend.

Is it calculated by the following formula?

Price Today minus Price 200 days ago divided by 200 days

2. ### tommintj

No...that is too crude to be useful. You want the slope "Today" so a better estimate is (today-yesterday)/1 day or "Rise over Run". You might want to try (today - ndays_ago)/n to smooth out some near term jitter but since you are using a 200 day, you may not need more than a tiny "n".

Price - Price[200] is a momentum calculation. Dividing it by 200 doesn't add anything useful. But, you could normalize it for comparison against other markets by dividing it by today's price.

But, none of that gives you the slope of a 200 DMA.

What you want is MA / MA[1]. If it's larger than 1 the average is moving up, less then one it's moving down.

Collecting a series of deltas and analyzing the distribution will give you some more insight into what a given value means.

(Y2-Y1)/(X2-X1)=Slope(first derivative)
If you're looking back one day only, simply subract today's MA value from yesterday's. That's it, since you're only looking back one day, the denominator will stay set at 1, and can be ignored. Second derivative is calculated the same, only using the first derivative values as your Y values.

If you get bored, you can take your shiny, new derivatives and integrate them.

5. ### MandelbrotSet

Just use a 50 period SMA as a crossover of the 200 period SMA ... like everyone else who uses the SMA 200.

As you can see from the chart, it approximates the slope of the 200 period SMA pretty well.

• ###### chart.png
File size:
37.2 KB
Views:
1,484
ET IS FREE BECAUSE OF THE FINANCIAL SUPPORT FROM THESE COMPANIES: