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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?