Tags:

This strategy generates trading signals based on the golden cross and dead cross of moving averages with different cycles. It belongs to a typical trend-following strategy. Weighted Moving Average (WMA) and Adaptive Moving Average (ALMA) are mainly used.

The strategy first calculates the medium-term and short-term moving averages, ma1 and ma2, of the price, where ma1 has a shorter cycle and ma2 has a longer cycle. Then it calculates the difference between ma1 and ma2 as ma3, and further computes the smoothed moving average ma4 of ma3. When ma3 crosses over ma4 upwards, a buy signal is generated. When it crosses downwards, a sell signal is generated.

Thus, ma3 reflects the medium-term trend of the price, and ma4 filters some noise from ma3 to form a more reliable trading signal. The cycles of ma1 and ma2 are set by the parameter maLen. Users can optimize parameters to achieve the best setting for different markets.

The advantages of this strategy include:

- Using ALMA and WMA that can better adapt to market changes.
- Applying multi-cycle price averaging to make trading signals more reliable.
- The adjustable parameters can be optimized for different markets with wide applicability.
- The strategy logic is simple and easy to implement.
- It can achieve good performance in both trending and sideways markets.

There are also some risks for this strategy:

- The signals may become unclear and delayed for volatile market conditions. This can be solved by optimizing the cycles and parameters of the moving averages.
- As a pure trend-following strategy, it may lead to losses during range-bound markets. Other indicators can be added as filters.
- Improper parameter settings may cause over-trading due to ultra short cycles. Appropriate parameters should be carefully selected.

The strategy can be optimized from the following aspects:

- Test more types of moving averages, like LMA, WMA, etc.
- Add stop loss mechanisms based on volatility, price channels, etc.
- Adopt multi-timeframe analysis with rolling optimization of parameters.
- Increase machine learning algorithms for automatic parameter optimization.

The strategy generates trading signals based on the golden cross and dead cross of moving averages. By using ALMA and multi-cycle price averaging, the signals become more precise and reliable. The adjustable parameters make it widely applicable. Also, the logic is simple and clear and performs well in trending markets. Therefore, it has high practical value.

/*backtest start: 2024-01-08 00:00:00 end: 2024-01-15 00:00:00 period: 10m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=3 strategy("Oracle Move Strategy", overlay=true) maLen = input(30, "ma period") mode = input(defval="wma", options=["alma", "ema", "wma"]) price = close ma(src, len) => mode=="alma" ? alma(src, len, 0.85, 6) : mode=="ema"? ema(src, len) : wma(src, len) ma1 = ma(price, floor(maLen / 2)) ma2 = ma(price, maLen) ma3 = 2.0 * ma1 - ma2 ma4 = ma(ma3, floor(sqrt(maLen))) //plot(ma1, color = red) //plot(ma2, color = green) plot(ma3, color = blue) plot(ma4, color = orange) mafast = ma3 maslow = ma4 if (crossover(mafast, maslow)) strategy.entry("MA2CrossLE", strategy.long, comment="MA2CrossLE") if (crossunder(mafast, maslow)) strategy.entry("MA2CrossSE", strategy.short, comment="MA2CrossSE") //plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)

- Optimized EMA Crossover Strategy
- MA Turning Point Long and Short Strategy
- RSI Target and Stop Loss Tracking Strategy
- RSI Indicator Based Short-term Trading Strategy
- Moving Average and Super Trend Tracking Stop Loss Strategy
- Linear Regression Channel Strategy
- Combination Trading Strategy Based on Dual EMA and Bandpass Filter
- Trend Tracking Trailing Stop Strategy
- Key Reversal Backtest Strategy
- Triangular Moving Average Crossover Trading Strategy
- Trend Following Strategy Based on Price Action and Volume
- Ichimoku Kinko Hyo Breakout Strategy
- ADX Momentum Trend Strategy
- Combination Strategy of 123 Reversal and Pivot Point
- Moving Average and Stochastic RSI Combination Trading Strategy
- Dynamic Trend Tracking Reversal Strategy
- Daily DCA Strategy with Touching EMAs
- Trend Strength Confirm Bars Strategy
- Super Trend Dual Moving Average Strategy
- WaveTrend and DER Based Swing Trading Strategy