muscleriot

200DMA last DOM - ajh

muscleriot 已更新   
Implements and backtests a simple 200 day moving average trend following rules based on last day of month to limits trades to 12 per year.
From the book : 5 BEST Moving Average Strategies (That beat buy and hold) by Steve Burns and Holly Burns

Click on the cog to set the input date range eg; 2000-01-01 to 2016-12-31

The book back tested SP500 returns from 2000-2016 317% using this method vs 125% buy and hold only with less drawdown.

Simple 200 day moving average test and trading on last day of month.
(you may find it trades on next available day close to end of month as not all dates can be traded weekends etc..)
Rules are ;
1. if last day of month and stock over 200 day moving average, then go long 100%
2. if last day of month and stock under 200 day moving average, then close long 100% and goto cash.

Aims to miss market declines and keep you long for upside.

Note: Have found doesn't work well in choppy markets moving sideways like the FTSE100 for same period 2000-2016 and causes losses. Also for many stocks.
版本注释:
版本注释:
Please use the ADJ swtich on the chart to get a TOTAL RETURN chart. TOTAL RETURN works better with this as the chart is biased upwards so keeps above the 200 DMA longer and get you out on larger swings down. The original 200 DMA method by Steve Burns used a TOTAL RETURN graph of SPX
版本注释:
Cleaned up the code, very easy to read now, but Major longstanding problem is trading at end of month. For some reason it skips whole months!
版本注释:
A simple but powerful trading stratergy based on the 200 day moving average.
A stratergy that is astonishingly simple but powerful, and outperforms the market most of the time.
The stratergy is for strongly trending indices like the SP500 index. Please use SPY plus ADJ (at bottom right of screen to get a Total Return chart)
This script should be used on the daily timeframe.
The Rules are simple:
1. Trade once per month, by default on first trading day of month based on the 200 day moving average.
2. If under 200 day moving average - Sell
3. If over 200 day moving average - Buy.

HOW AND WHY IT WORKS SO WELL:
The 200 day moving average is used to detect the market trend.
A single trade per month is used to stop whipsaw losses.

This will help keep you out of down trends but help keep you in rising trends.
You will find this stratergy tested against the SP500 total return chart going back 20 years generally outperforms the market, reducing capital lost to drawdowns (down trends) and getting you fully in on uptrends.
Note: Doesn't work well for non-trending volitile sideways markets where chop creates losses.

Please use the SPY with ADJ on the daily chart to get a TOTAL RETURN chart. It's essential to use a total return chart (meaning dividends and distributions are included) because the steeper trend keeps you in the market upswings longer, detects downtrends below the moving average faster to get you out. That's because the moving averages reflect reality better!

You can test for what works best over a long backtest.
You can change the moving average from 200 to 150 days or whatever you want.
You can change the dates to backtest, and add an offset in days.

This Script owes a lot to Steve and Holly Burns published and backtested stratergy based on the 200 day moving average - see the script code header for more details
开源脚本

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

免责声明

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

想在图表上使用此脚本?