Multi MA Trend Following Strategy Template

TradeAutomation Premium ที่อัปเดต:   
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.
Fixed typo
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
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.
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:

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎของบ้าน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้


ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ