DreamsDefined

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: stockcharts.com/arti...trend-gauge-568.html

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.

DD
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?