Type/to search

Bi-Directional Trend Tracking Moving Average Crossover Strategy

Cryptocurrency
Created: 2023-11-23 15:26:25
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy calculates bi-directional smoothed moving averages combined with a trend indicator to implement an automated trend tracking crossover trading strategy. The strategy aims to track long-term trends and achieve higher returns during strong trends.

Strategy Logic

  1. Calculate bi-directional smoothed moving averages of the asset price, including the open price moving average and the close price moving average.
  2. Use correlation coefficient and ATR indicator to calculate price trend indicator.
  3. Combine price trend indicator with bi-directional moving averages to get overall trend judgment.
  4. Go long when open price moving average crosses above close price moving average; close position when cross below.
  5. Only go long when trend indicator also indicates an uptrend; only go short when trend indicator indicates a downtrend.

Advantages

  1. Bi-directional moving averages trace trends more smoothly and steadily.
  2. Trend indicator helps better determine trend direction and avoid wrong trades.
  3. Crossovers provide clearer trading signals.
  4. Customizable smoothness through parameter tuning to suit more market environments.
  5. Multiple cross validations between indicators help avoid false signals.

Risks

  1. Risk of missing reversal at trend turning points. Can be mitigated by tuning moving average periods.
  2. Moving averages themselves have lag. Need validation from trend indicator.
  3. Improper moving average periods may lead to overtrading or missing good entries.
  4. Extensive parameter optimization is needed to adapt to different timeframes and markets.

Improvements

  1. Test more types of moving averages.
  2. Try other types of trend indicators.
  3. Optimize parameters of moving averages and trend indicators.
  4. Incorporate other indicators like volatility.
  5. Add stop loss strategies.

Conclusion

With parameter tuning, this multi-dimensional trend strategy can steadily track long-term trends with relatively low risk. But be cautious of overfitting. Overall it delivers long-term trend tracking with controllable risks and is worth further research and application.

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

//@version=4
//Author Josef Tainsh PhD 6Sept2020

Strategy parameters
Strategy parameters
ATR Trend Resolution: (mins)
ATR Trend Length
ATR Trend Multiplier
Correlation Trend Resolution: (mins)
Correlation Trend Length (eg 28 for 1 hour)
Correlation Trend Tuner (0 to 1)
Trend Combination Tuner (0 to 1): 0=all ATR, 1 = all Corr
Set MA Resolution ( note run alerts on 1min chart )
MA Type:
MA Period
Offset for LSMA / Sigma for ALMA (6 is large)
Alma Offset (between 0 and 1, 0.99 = resposive, 0.01 = smooth)
Backtest Start Year
Backtest Start Month
Backtest Start Day
Backtest Stop Year
Backtest Stop Month
Backtest Stop Day
Include Long Trades
Include Short Trades
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)