Type/to search

Triple Moving Average Trading Strategy

Cryptocurrency
Created: 2023-11-02 14:47:45
Last modified: 3 years ago
1
Follow
1781
Followers

img

Overview

This strategy is a trend-following trading strategy based on three moving averages. It uses three moving averages with different periods for long and short decisions, which is a typical trend tracking strategy.

Strategy Logic

  1. The strategy uses 3 moving averages: MA1, MA2 and MA3. The periods of the 3 moving averages are set by the user, generally MA1 < MA2 < MA3, for example, MA1 is 50 periods, MA2 is 100 periods, and MA3 is 200 periods.

  2. The strategy mainly references MA1 for trading decisions. When the short period MA1 crosses over the long period MA2 or MA3, go long; when MA1 crosses below MA2 or MA3, go short.

  3. The strategy can choose to trade only the crossover of MA1 and MA2, or only the crossover of MA1 and MA3, or trade both crossovers.

  4. When a crossover signal occurs, open a position using market order. The take profit and stop loss are set as a certain percentage of the close price, such as 30% take profit and 15% stop loss.

  5. For optimization, the periods of the MA lines can be adjusted, the percentages of take profit and stop loss can be tuned, other indicators can be added to filter the signals, etc.

Advantage Analysis

  1. Using multiple moving averages for decision making can effectively filter false breakouts.

  2. Adopting MA combinations with different periods can dynamically adjust positions in the trend and achieve trend tracking.

  3. It is flexible to only trade Golden Cross, or only Death Cross, or both, with diverse trading methods.

  4. The stop loss mechanism can effectively control single loss.

Risk Analysis

  1. As a trend tracking strategy, it is prone to stop loss in range-bound markets.

  2. If MA periods are improperly set, it may lead to frequent trading and lower win rate.

  3. If failed to cut loss in time after failed breakout, it may lead to large loss.

  4. If take profit and stop loss settings are too loose, single profit or loss may be too large.

Optimization Directions

  1. Optimize the parameters of MA to find the best parameter combination.

  2. Add other indicators to filter the entry timing, such as MACD, KDJ etc.

  3. Optimize take profit and stop loss points to improve profit-risk ratio of the strategy.

  4. Add position sizing like fixed quantity per order or money management.

  5. Add stop loss offset for breakouts to optimize the stop loss strategy.

Summary

In general this is a typical trend-following strategy by judging the crossover of multiple MA lines. It is a relatively stable trend tracking strategy. Further improvements can be made through parameter tuning, indicator filtering, position sizing etc. But the core idea is simple and clear, suitable for beginners to learn and practice. If parameters are properly optimized, it can achieve steady profits in strong trending markets.

Source
Pine
/*backtest
start: 2023-10-02 00:00:00
end: 2023-11-01 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4

//
// Pine Script v4
Strategy parameters
Strategy parameters
MA1 Period
MA1 Type
MA1 Source
MA1 Resolution
MA1 Visible
MA2 Period
MA2 Type
MA2 Source
MA2 Resolution
MA2 Visible
MA3 Period
MA3 Type
MA3 Source
MA3 Resolution
MA3 Visible
Show Crosses
Forecast Bias
Forecast Bias Period
Forecast Bias Magnitude
Show Forecasts
Show Ribbons
Trade MA 1-2 Crosses
Trade MA 1-3 Crosses
Trade MA 2-3 Crosses
Take Profit Percent
Stop Loss Percent
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)