Triple SMA Auto-Tracking Strategy
Overview
The Triple SMA strategy is a trend-following strategy based on three simple moving averages (SMA) of different periods for trend identification and entries. It can automatically track trends and add positions during pullbacks in trends.
Strategy Logic
The strategy uses three SMAs of different periods as the main trend indicator, including 200-, 400-, and 600-period SMAs. When price is above all three SMAs, it indicates an upward trend, and vice versa for downtrend.
For entries, the strategy combines the use of close price and StochClose oscillator. Signals are generated only when price aligns with the triple SMAs’ direction. StochClose identifies overbought/oversold levels and gives long signal when crossing above 95 and short signal when crossing below 5.
The stop loss is set to price crossing below the slowest SMA.
The strategy allows pyramiding up to 10 times. Three take profit levels are built-in at 1%, 2% and 6% profits.
Advantage Analysis
The biggest advantage of the Triple SMA strategy is that by combining three SMAs of different periods, it can better identify trend direction and strength. It has stronger capabilities of filtering out false signals than single SMA strategies.
Additionally, incorporating StochClose for overbought/oversold analysis avoids taking signals around potential trend reversal points.
The stop loss based on the slowest SMA also maximizes the strategy's capability of riding trends while minimizing premature stop outs.
Allowing pyramiding enables the strategy to continously participate in trends.
Risk Analysis
The main risk of this strategy is that the triple SMAs may not completely filter out all false signals. If price fails to form a trend after breaking through the SMAs and pulls back soon, losses can occur. This often happens around major support/resistance levels.
Also, StochClose itself may generate incorrect signals, leading to inappropriate entries, especially in ranging markets.
To mitigate these risks, parameters like SMA periods can be adjusted. More indicators can be added, like KDJ and MACD, to improve signal quality.
Optimization Directions
The strategy can be optimized in the following aspects:
-
Add/tune SMA periods to find optimal values fitting specific products
-
Add additional indicators like KDJ and MACD for combo filtering and better entries
-
Optimize stop loss and take profit standards to better fit market volatility ranges
-
Optimize pyramiding settings to find ideal pyramiding strategies
-
Test across different products and make parameters adaptive to more products
Conclusion
In conclusion, the Triple SMA strategy is a very practical trend-following approach. By combining triple SMAs and StochClose, it achieves solid trend identification and avoids false signals. Allowing pyramiding also enables tracking trends. With parameter tuning and optimizations, it can become a powerful trend tracker.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy(title="Tripla Sma with entries based on sma price closes ", shorttitle="TRIPLE SMA STRATEGY", overlay=true) ////resolution=""
len = input(200, minval=1, title="sma 1 length")
len1 = input(400, minval=1, title="sma 2 length")- 1

