OPEN-SOURCE SCRIPT
Moving Average 250-day Strategy

This indicator creates buy/sell signals based on the daily close crossing over its 250-day Simple Moving Average (as green/red vertical bars). The signals are locked on the daily timeframe.
There is also a counter implemented indicating the number of trades/crossovers present in the current chart (marked in yellow).
There have been papers suggesting trading around the Moving Average can greatly increase the portolio's risk metrics, e.g. "Leverage for the Long Run - A Systematic Approach to Managing Risk and Magnifying Returns in Stocks" (Michael A. Gayed).
This script provides the ability to help you create such a trend-following strategy.
Best used on a broad index like the S&P 500, the strategy should go long when the the daily close crosses above the 250-day SMA and orders are closed when the 250-day SMA crosses below the daily close. This simple indicator does not take into account any other stop loss or take profit money management logic.
Thanks.
There is also a counter implemented indicating the number of trades/crossovers present in the current chart (marked in yellow).
There have been papers suggesting trading around the Moving Average can greatly increase the portolio's risk metrics, e.g. "Leverage for the Long Run - A Systematic Approach to Managing Risk and Magnifying Returns in Stocks" (Michael A. Gayed).
This script provides the ability to help you create such a trend-following strategy.
Best used on a broad index like the S&P 500, the strategy should go long when the the daily close crosses above the 250-day SMA and orders are closed when the 250-day SMA crosses below the daily close. This simple indicator does not take into account any other stop loss or take profit money management logic.
Thanks.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.