Smoothed Moving Average Strategy
Overview
This strategy combines multiple moving averages to implement a simple trend following strategy. It also has the functionality of filtering out noise.
Strategy Logic
The strategy first smoothes the closing price, with the option of using Heiken Ashi closing price. It then calls the smoothMA function to overlay multiple smoothed moving averages. The smoothMA function first calls the variant function, which can generate various types of moving averages like SMA, EMA, DEMA etc. After variant function generates the specified moving average, smoothMA recursively calls variant multiple times to overlay the smoothing. This results in a moving average with high level of smoothness. It generates buy signals when the smoothed MA goes up and sell signals when it goes down.
Advantage Analysis
- Multiple overlay of moving averages can effectively filter market noise and identify trends.
- Supports various moving average types like SMA, EMA, DEMA etc, allows flexible combinations.
- Heiken Ashi technique filters out false breakouts.
- Simple and easy to implement.
- Customizable MA length, type and smoothing times allows optimization for different products.
Risk Analysis
- Multiple smoothing may cause lag and miss early trend changes.
- Simple MA system struggles to profit in ranging markets.
- Ignores transaction costs which erodes profitability in actual trading.
- No stop loss in place, risks enlarged losses.
Consider combining other indicators like MACD, KDJ to improve signal accuracy. Optimize MA parameters to reduce lag. Use reasonable stop loss to control single trade loss. Also control trade frequency to minimize transaction costs.
Optimization Directions
- Test different MA lengths and types for best combination.
- Add other technical indicators for more systematic entry and exit rules.
- Set trading session to avoid influence from major events.
- Adjust parameters based on product characteristics.
- Set stop loss and take profit to control risks.
Summary
The strategy follows trends via multi-overlay of moving averages, effectively filtering market noise. The advantages are simplicity and flexibility. But relying solely on MAs has limited profitability. Consider combining with other indicators, managing risks and optimizing parameters to improve efficiency.
/*backtest
start: 2022-10-30 00:00:00
end: 2023-11-05 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
// Copyright (c) 2007-present Jurik Research and Consulting. All rights reserved.
// Copyright (c) 2018-present, Alex Orekhov (everget)
// Thanks to everget for code for more advanced moving averages- 1

