Type/to search

Moving Average Crossover Trend Following Strategy

Cryptocurrency
Created: 2023-09-15 16:56:40
Last modified: 3 years ago
1
Follow
1781
Followers

This strategy is called the Moving Average Crossover Trend Following Strategy. It uses golden crosses and death crosses of multiple moving averages to determine market turning points and follow trends.

How It Works

  1. Calculate multiple moving averages with different parameters, e.g. MA(5), MA(10) etc.

  2. When shorter period MA crosses above longer period MA, a buy signal is generated.

  3. When shorter period MA crosses below longer period MA, a sell signal is generated.

  4. The crossover function judges crossovers. MA periods can be flexibly configured.

Trading Rules

  1. Set up multiple MAs like MA(8), MA(13), MA(21) etc.

  2. When MA(8) crosses above MA(13), go long.

  3. When MA(8) crosses below MA(13), go short.

  4. MA types like EMA, SMA can be used.

  5. Add other filters to avoid false breakouts.

Advantages

  1. Trend following avoids counter trend trades.

  2. Flexible MA periods suit different cycles.

  3. Additional indicators can filter signals.

  4. Smaller drawdowns, stops further limit risks.

Risks

  1. Risk of extended losses in protracted downtrends.

  2. Poor MA parameters may miss trades.

  3. Timely stops needed to limit drawdowns.

  4. Fees also impact profits.

Summary

The MA Crossover Trend Following Strategy follows the trend for profits. Parameter optimization provides short and long term effects. Additional technical analysis improves performance. Strict stops are musts for risk control. Trading costs should also be considered when trading live.

Source
Pine
/*backtest
start: 2023-09-07 00:00:00
end: 2023-09-08 09:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//Converted to strategy by shawnteoh

strategy(title = "MA Emperor insiliconot Strategy" , overlay=true, pyramiding=1, precision=8)
Strategy parameters
Strategy parameters
Strategy Direction
Backtest Start Year
Backtest Start Month
Backtest Start Day
Backtest Stop Year
Backtest Stop Month
Backtest Stop Day
Order quantity
Plot indicators?
Type
MA 1
MA 2
MA 3
MA 4
MA 5
IB
2B
21b
22b
Enable 1
Enable 2
Enable 3
Enable 4
Enable 5
Enable 6
Enable 7
Enable x
Enable x
*** Gaussian poles ***
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)