Type/to search

Trend Following Strategy Based on Moving Averages

Cryptocurrency
Created: 2023-11-27 15:57:15
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This is a trend following strategy based on moving averages. It utilizes the Ichimoku Cloud indicator to determine trend direction combined with the 200-day moving average to filter signals, thus tracking the trend.

Strategy Principle

The strategy mainly uses the conversion line and base line of Ichimoku Cloud to judge trend direction. The conversion line is the 9-day median price average and the base line is the 26-day median price average. A buy signal is generated when the conversion line crosses above the base line and a sell signal when crossing below.

The strategy also employs the 200-day moving average to filter signals. Only when the closing price is above the 200-day line will a buy signal be triggered. This filters out most of the false signals.

On the exit side, the strategy simply uses the conversion line crossing below the base line as the closing signal.

Advantage Analysis

The strategy combines the trend judgment indicator Ichimoku Cloud and long-term trend filtering indicator 200-day line, which can effectively track trends and filter out most false signals. Using median price averages reduces the impact of price anomalies on moving averages.

Compared to solely using moving averages, this strategy can better capture trend turning points and timely adjust positions. This is its greatest strength.

Risk Analysis

The strategy relies mainly on Ichimoku Cloud to determine trend direction, which itself could also generate false signals. If judgment is inaccurate, the strategy may lead to losses.

In addition, improper parameter settings could also lead to poor strategy performance. If the conversion line parameter is too short, false signals are easily formed; if the base line parameter is too long, the tracking effect deteriorates. Parameter tuning for balance is needed.

Optimization Directions

Consider incorporating other indicators to improve signal quality, such as the KDJ indicator to filter signals in overbought/oversold areas. Or use the ATR indicator to set stop loss.

On the parameter side, test more combinations, such as adjusting the conversion line parameter to 5 or 7 days for more sensitive trading signals. Also test modifying the base line parameter to around 20 days to balance tracking.

In addition, consider disabling the strategy under certain volatile environments to avoid the impact of wild swings.

Conclusion

The strategy integrates the advantages of trend judgment and long-term filtering indicators, which can effectively track medium and long-term trends. Meanwhile, parameter settings and risk control measures also need continuous optimization to reduce false signals and impacts from fluctuations. Overall, the strategy has decent performance and practical value for actual trading.

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

//@version=3
strategy(title="TK Cross > EMA200 Strat",  overlay=true)

ema200 = ema(close, 200)
Strategy parameters
Strategy parameters
Conversion Line Periods
Base Line Periods
Lagging Span 2 Periods
Displacement
Start - Default = 2 - Multiplied by .01
Step Setting (Sensitivity) - Default = 2 - Multiplied by .01
Maximum Step (Sensitivity) - Default = 2 - Multiplied by .10
Show Up Trending Parabolic Sar
Show Down Trending Parabolic Sar
Start and Step settings are *.01 so 2 = .02 etc, Maximum Step is *.10 so 2 = .2
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)