Type/to search

Moving Average Directionality Trend Strategy

Cryptocurrency
Created: 2023-09-14 17:47:01
Last modified: 3 years ago
1
Follow
1781
Followers

Strategy Logic

This strategy determines the long-term trend direction by analyzing the directionality of multiple moving averages. It goes long or short according to the trend.

The logic is:

  1. Compute moving averages of differing periods, e.g. 5-day, 20-day, 50-day, etc.

  2. Compare the directional tendency of the MAs to determine consistent alignment

  3. When MAs are uniformly trending up, a long-term bullish view is held. When uniformly down, long-term bearish.

  4. In bullish conditions, breakouts above downside stop loss triggers long entries

  5. In bearish conditions, breakouts below upside stop loss triggers short entries

  6. Trailing stops are used to control risk

The strategy emphasizes confirming the long-term trend before trading to reduce non-systematic risk.

Advantages

  • Multiple MAs combine to judge long-term trend directionality

  • Breakout entries follow the trend

  • Trailing stop strategy controls risk

Risks

  • MAs themselves lag prices

  • Incorrect trend judgement can lead to sustained losses

  • LONG or SHORT only misses opportunities

Summary

This strategy stresses determining the secular trend via MA directionality to minimize non-systematic risks. But judgement accuracy and stop tuning are critical.

Source
Pine
/*backtest
start: 2022-09-07 00:00:00
end: 2023-06-24 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © HeWhoMustNotBeNamed

//@version=4
Strategy parameters
Strategy parameters
Moving Average Type
LookbackPeriod
shortHighLowPeriod
longHighLowPeriod
atrlength
stopMultiplyer
reentryStopMultiplyer
exitOnSignal
Trade Direction
backtestYears
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)