Triangular Moving Average Crossover Trading Strategy
Overview
The Triangular Moving Average (TMA) Crossover trading strategy is a typical technical analysis strategy. It utilizes three moving average lines of different time lengths to capture trends and implement low-risk trading. When the short-term moving average crosses over the medium-term moving average upwards, and the medium-term moving average is above the long-term moving average, a buy signal is generated. When the short-term moving average crosses below the medium-term moving average downwards, and the medium-term moving average is below the long-term moving average, a sell signal is generated.
Strategy Logic
The TMA strategy mainly relies on three moving average lines to determine the trend direction. The short-term moving average responds sensitively to price changes; the medium-term moving average provides a clearer judgment of the trend; the long-term moving average filters out market noise and determines the long-term trend direction.
When the short-term moving average crosses over the medium-term moving average upwards, it indicates the price has started to break out upwards. At this time, if the medium-term moving average is above the long-term moving average, it means the current market is in an uptrend. Therefore, a buy signal is generated here.
On the contrary, when the short-term moving average crosses below the medium-term moving average downwards, it indicates the price has started to break out downwards. At this time, if the medium-term moving average is below the long-term moving average, it means the current market is in a downtrend. As a result, a sell signal is generated.
This strategy also sets stop-loss and take-profit lines. After entering a trade, stop-loss and take-profit prices will be calculated based on the percentage settings. If the price touches either line, the position will be closed.
Advantage Analysis
- Utilize three moving averages together to improve judgment accuracy
- Set stop-loss and take-profit to effectively control per trade risk
- Customizable moving average parameters suitable for different products
- Seven options for moving average types, diversified strategy types
Risk Analysis and Solutions
-
Wrong signals when three MAs are consolidating
Solution: Adjust MA parameters properly to avoid wrong signals
-
Over-aggressive stop-loss/take-profit percentage
Solution: Fine-tune percentages; cannot be too big or too small
-
Improper parameter settings leading to too many or too few trades
Solution: Test different parameter combinations to find optimum
Optimization Directions
The TMA strategy can be optimized from the following aspects:
-
Test different type and length combinations to find optimum
Test different MA length or type combinations for best results
-
Add other technical indicators as signal filters
Add indicators like KDJ, MACD etc. for multi-factor verification
-
Select parameters based on product characteristics
Shorten MA periods for volatile products; Lengthen periods for steady products
-
Utilize machine learning to find optimum parameters
Auto parameter sweeping to quickly locate optimum
Conclusion
The TMA Crossover strategy is an easy-to-use trend following strategy overall. It utilizes three MAs together to capture trends and sets stop-loss/take-profit to control risks, enabling stable profits. Further improvements can be achieved through parameter optimization and integrating extra technical indicators. In conclusion, this strategy suits investors seeking steady gains.
/*backtest
start: 2024-01-08 00:00:00
end: 2024-01-15 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
strategy("Kozlod - 3 MA strategy with SL/PT", shorttitle="kozlod_3ma", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 5)
// - 1

