Multi MA Trend Following Strategy Template

TradeAutomation Actualizado   
Trend following is one of the better known technical trading strategies. But, which trend should you follow? Today I am sharing with the community a trend following template script that includes a selection of over 20 different trends / regressions. Some of these are in the Pine library, and some have been custom coded and contributed over time by the beloved Pine Coder community.

How it works:
This template will plot any of the 20+ trends that you can select in the settings. The strategy component will buy if the trend line is moving up, and will sell if it moves down. If the line is green that indicates that the trend is higher than the prior bar. If the line is red that indicates that the trend is lower than the prior bar. This script is different from many moving average scripts in that it follows the trend itself and doesn't look for a cross of multiple trends.

How to use it:
When wanting to trend follow an instrument, you can use this template to help identify what approach you might want to take and/or which indicator you might want to use. You can also modify the strategy as you see fit and make use of the 20+ incorporated indicators. Incorporate your trade and risk management strategy, or use it as an indicator.

Disclaimer: Open source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. Even though this example script might beat buy and hold over the back-test time-frame, I wouldn't advise using it as a stand-alone strategy without significant additions/modifications to the strategy and risk management functions.
Notas de prensa:
Fixed typo
Notas de prensa:
Current list of indicators/trends integrated into this strategy:
ALMA, DEMA, EMA, HMA, JMA, KAMA, Linear Regression (LSMA), RMA, SMA, SMMA, Price Source, SuperTrend, TEMA, TMA, VAMA, VIDYA, VMA, VWMA, WMA, WWMA, ZLEMA
Notas de prensa:
Updated version: Adds an option to model short trades, replaces JMA with the Everget version (that has more options), and adds more decimal points in the trend calculation to increase its accuracy.
Notas de prensa:
Added Ehlers Deviation-Scaled Moving Average indicator to the strategy/trend options (DSMA). Originally developed by John F. Ehlers (Stocks & Commodities V. 36:8: The Deviation-Scaled Moving Average). Originally coded in Pine v3 as an indicator by Everget, translated into a Pine v5 strategy by TradeAutomation.

Want to build custom alerts and custom strategies? Interested in automated trading?

Hire me to code or automate your trading strategy, or schedule a free consultation at:
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?