Dual Moving Average Crossover Trading Strategy
Overview
This strategy determines entries and exits based on the crossover signals of dual simple moving averages (SMA). Specifically, the short term SMA has a period of 14, while the long term SMA has a period of 28. A long signal is triggered when the short term SMA crosses over the long term SMA. Conversely, a short signal is triggered when the short term SMA crosses below the long term SMA.
Strategy Logic
-
Inputs
- Indicator Settings: Define periods for the fast and slow SMA
- Take Profit and Stop Loss: Configure percentages for take profit and stop loss
- Money Management: Set initial capital, commission fees etc.
-
Variables
Intermediate variables are defined to store values for take profit price, stop loss price, position sizing etc. This avoids repetitive calculations.
-
Signal Generation
SMA crossover is used to determine long and short signals.
-
Entry Rules
When an entry signal is triggered, any existing position in the opposite direction is flattened first before a new order is placed based on strategy logic.
-
Exit Rules
Take profit and stop loss rules are configured for position exits.
-
Money Management
Position sizing is used to manage risk per trade.
Advantages
- Simple logic, easy to understand
- Controllable drawdowns
- Optimizable parameters
Risks and Mitigation
-
Lagging SMA crossover signals
Consider shorter SMA periods, or supplement with additional indicators
-
Increased stop loss risk in ranging markets
Widen stop loss percentage, or use trailing stops
-
Suboptimal parameters may amplify losses
Rigorously backtest and optimize parameters
Enhancement Opportunities
-
Complement with additional indicators
E.g. MACD, KD etc to reduce signal lag
-
Optimize SMA periods
Test more combinations of short and long SMA periods
-
Experiment with other take profit/stop loss strategies
E.g. fixed $ value, trailing stops etc
Conclusion
The strategy has clear and simple logic, promising backtest results, and is easy to operate - suitable for novice traders. There is still room for improvement via additional indicators, money management techniques etc to make the strategy more robust.
/*backtest
start: 2023-10-21 00:00:00
end: 2023-11-20 00:00:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BigJasTrades https://linktr.ee/bigjastrades
// READ THIS BEFORE USE:- 1

