Mega Trend Plus - S&P 500 Trend Follower / Market Gauge

Firstly, 100% of the credit goes to Greg Morris @ Stockcharts.com for the article detailing the concept and most of the settings/components. I've simply implemented his idea. I haven't sought permission from him, but given that he was open with the components of the indicator I'm assuming he's happy for me to go ahead and code this in pinescript. See the article here: https://stockcharts.com/articles/dancing...

Okay, so this is part of a system/indicator Greg outlined in the article that he calls Trend Gauge. The idea is fairly simple: take a group of indexes that cover the breadth of the market you want to trade, track their relationship/position to their 200 period Exponential Moving Average ( EMA ), and assign scores to bull/bear crosses + relative location to the EMA . Once you've normalized and aggregated the scores you finish up with a trend following indicator that works surprisingly well.

This part is called Mega Trend Plus, and tracks whether an index is above or below its 200 period EMA . I'll be releasing the second part ("Trend Strength") soon. Once that's done I'll combine them to form the full "Trend Gauge" indicator.

I decided to provide the base version that people can then experiment with and tweak to their liking, so Greg's version shown in the article is smoother than the one provided here. It's up to you to play with smoothing options, and potentially tweak the weightings of the various components. Please see the script for info on what the various inputs are - I've added notes there.

So, how does it do? Well, as you can see from the chart above it works pretty well overall. The S&P 500 has been fairly trendy over the last few decades, so it's been prime territory for a system like this. It would have kept you out of the big bear markets (particularly GFC & 2015-16), and that's the goal of any trend-based system. They thrive on how little they lose, not necessarily on how much they make.

As you can see, the indicator is pretty choppy. So it's not designed (in the current configuration) to provide accurate buy/hold/sell signals. It currently functions more as a market gauge / strength indicator.

Hopefully you find this concept interesting. It's simple, but the best systems often are.

Please add comments below if you come up with an interesting configuration or variation.

Let me know if you have any queries.

Open-source Skript

Ganz im Sinne von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es verstehen und überprüfen können. Ein Hoch auf den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln. Sie können das Skript den Favoriten hinzufügen, um es auf dem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


thanks man!
Playing with the "Buy Threshold" input is the best way to smooth signals. Obviously that comes with the downside of identifying downtrends later. Here I've set the "Buy Threshold" to 60.

DreamsDefined DreamsDefined
@DreamsDefined, I should clarify, it's the best way to QUICKLY smooth signals. Not necessarily the most efficient/profitable.