New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Any way to chart the slope of a moving average?

I use a combination of slope parameters to include a trend in my scans. As an example, this is giving me good results when looking at stocks in an uptrend:

and [slope(100,ema(50)) > 0]
and [slope(50,ema(50)) > 0]
and [slope(25,ema(50)) > 0]

Now, what I have not been able to find is any way to include the slope of the moving average in my charts. I know I can do the opposite - include the moving average of the slope - but not the slope of the moving average. Any suggestions? I'm trying to think of, perhaps, a different indicator that, using the right parms, would be the equivalent of the 50-day EMA, and I could then apply the Slope to that in advanced options. Unfortunately, I'm drawing a blank on it.


-- Ron

Best Answer


  • Perfect, Gord! Thank you. That does exactly what I was looking for.
  • KevoKevo
    edited December 2014
    Moving Averages are a price based indicator. Slope is a non-price based indicator. There is an article somewhere on SCC that explains this. These two are different classes of indicators. Price based indicators are in the overlay section of SharpCharts. Non-price based indicators are in the Indicator section of SharpCharts.

    You can apply the slope to any non-price based indicator using the advanced options in the Indicator section of SharpCharts. The Advanced Option under the Overlay section does not allow you to drop slope.

    You can use PPO or MACD non-price based indicators to find the difference between the 1 period EMA and 50 period EMA: PPO(1,50,1). You can then apply the slope to the PPO in the advanced options.

    I noticed that you are only using 1 Moving Average. I would suggest using a long-term, medium-term, and short-term MA.

    P.S. A special feature allows you to put a non-priced based indicator behind the chart. This is for convenience.

    Think of slope as a digital signal. It can either be on or off. It can be negative and improving, but it's still negative.
  • Kevo, thanks for a thorough commentary. Gord answered my specific question on how to apply the slope to a specific moving average, however you raise some very interesting discussion points.

    Essentially, I'm using the 50 period EMA to determine the current trend of the stock. I'm taking long positions when EMA(50) is in a clear upward slope, short positions when the EMA(50) is in a clear downward slope, and I take very short term positions in either direction based on overbought/oversold positions when the EMA(50) is flat.

    What I initially needed was a convenient way of scanning the positive / negative direction of the slope of the EMA(50) and I did find that. Being a typical systems programmer, though, I need to test every theory six ways from Sunday (laughs). So I needed a way to chart slope(50,ema(50)), etc, to give me visual confirmation that my scan was returning the type stocks I wanted.

    (For actual trading, I use EMA(126) and EMA(200) to give further insight into the trend, and I use %B(20,2) for insight into when a stock is ready for entry, essentially waiting for pullbacks against the current trend, and then use a slow stochastic signal to indicate it's ready to resume the trend. Toss in some manual support/resistance and channel charting, and you essentially have my current methodology.)

    The slope methodology works very well to identify up and down trends. It does not, however, do a good job in identifying a flat trend, so I'm still searching for a good, consistent method for pulling out those stocks.

    Does that makes sense? I'm always open for suggestions on how to improve the scan and trade logic, and definitely value your insight.
  • (*) Wow Gord, that's really interesting what you did; Very pro indeed!

    Hi Kannafoot,

    When you say up and down trends, I figure you mean a ranging market, or sideways market. Momentum based indicators are best for that. Not sure how to interpret flat trend. Maybe you mean a steadily rising or falling trend, in which case it's referred to as trending. Momentum indicators don't work so well in trending markets.

    I might need a refresh, but I think of Slope as a trend/cycle/trend reversal confirmation indicator and not so much a momentum or OB/OS indicator (even though it might be used in that way, similar to ROC). That being said, it may be lagging. If that's the case, then I would think of applying Slope to the most important thing: price, to get the best signals. Just a thought.
Sign In or Register to comment.