MoonFlag MACD Momentum StochRSI Trading Strategy
Overview
The MoonFlag MACD Momentum StochRSI Trading Strategy is a quantitative trading strategy that utilizes MACD, momentum and StochRSI indicators for judgment. It is mainly suitable for Bitcoin and Ethereum daily trading.
Strategy Logic
The strategy uses the following key indicators for judgment:
-
MACD Indicator: Fast SMA period is 50 and slow SMA period is 200, representing the commonly used 50-day line and 200-day line in the market. This indicator judges the long-term trend direction of the market.
-
Custom momentum indicator: Essentially similar to the Stoch indicator, used to judge the short-term momentum direction of the market.
-
StochRSI Indicator: Judges the strength and overbought/oversold levels of the market.
To enter long, it needs to meet the 3 conditions of MACD>0 (representing upward medium-to-long term trend), custom momentum indicator >0 (representing upward short-term momentum) and close price higher than previous close (representing current uptrend) simultaneously.
Closing long signal is slightly more complex, requiring MACD<0, custom momentum indicator <0, close price lower than previous close and StochRSI>20 the 4 conditions to be met simultaneously.
The strategy comprehensively judges the medium-to-long-term trend, short-term momentum and current trend, and is a relatively robust breakout system.
Advantages of the Strategy
-
Comprehensive judgment of multiple indicators avoids generating false signals
-
MACD parameter selection considers the important 50-day line and 200-day line in the market
-
After parameters of each indicator were tested for variation, strategy performance changed little, avoiding overfitting risk
-
Backtested with sufficient data with high reliability
Risks of the Strategy
-
Breakout systems are prone to arbitrage, which may increase number of trades and slippage costs
-
High complexity with comprehensive multi-indicator judgment, difficulty in parameters tuning and optimization
-
High intraday short-term trading risks
Optimization Directions
-
Incorporate analysis of more indicators, such as trading volume
-
Increase machine learning algorithms for dynamic parameter optimization
-
Lower trading frequency, convert to higher periodicity for judgments
Summary
The MoonFlag MACD Momentum StochRSI Trading Strategy comprehensively judges market trends and strength with multiple indicators, has good backtest results and high reliability, suitable for experienced quantitative traders to apply and optimize on quality cryptocurrencies.
/*backtest
start: 2023-02-16 00:00:00
end: 2024-02-22 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// // © MoonFlag
//@version=5
strategy("MoonFlag 1D MACD Momentum StochRSI Strategy", max_bars_back=500, overlay=false, initial_capital=5000, default_qty_type=strategy.percent_of_equity, default_qty_value=80, pyramiding=0, calc_on_order_fills=true)- 1

