Type/to search

MACD, RSI and EMA Strategy

Cryptocurrency
Created: 2024-03-01 12:23:38
Last modified: 2 years ago
1
Follow
1781
Followers

img

Overview

This strategy combines Simple Moving Average (SMA), Average True Range (ATR), Commodity Channel Index (CCI) and Bollinger Bands to identify short-term and mid-term price trends and provide support for trading decisions.

Strategy Principle

The strategy uses four SMA lines with different periods to recognize price trend direction, including 5-day, 10-day, 50-day and 200-day lines. ATR is used to measure market volatility and set stop-loss points. CCI is used to identify overbought and oversold conditions. The upper and lower rails of Bollinger Bands can serve as support/resistance levels.

Go long when the short-term SMA (5-day and 10-day lines) crosses above the long-term SMA (50-day and 200-day lines). Go short when the short-term SMA crosses below the long-term SMA. Sell when CCI is greater than 100; Buy when CCI is less than -100. Set stop loss based on ATR values.

Advantage Analysis

By combining the trend judgment of moving average lines and the overbought/oversold judgment of CCI, this strategy can effectively seize market opportunities. It works especially well for medium and short-term trading. In addition, the risk control is relatively scientific, which can maximize the avoidance of losses.

Risk Analysis

This strategy is relatively conservative and likely to miss trading signals. When there is range-bound market or trend reversal, profit-taking may be triggered prematurely. In addition, improper parameter settings can also affect performance.

Optimization Directions

Try to optimize the parameters of SMA to make them closer to current market conditions. The standard deviation of Bollinger Bands can also be adjusted for better performance as support/resistance levels. In addition, consider adding other indicators to assist judgment, such as KDJ, MACD etc. This may improve win rate of the strategy.

Summary

Integrating a variety of analytical tools to judge the market, this strategy can yield satisfactory investment returns when parameters are set appropriately. Its stop loss rules also make risks controllable. It is worthwhile to verify and optimize in paper trading and live trading.

Source
Pine
/*backtest
start: 2023-02-23 00:00:00
end: 2024-02-29 00:00:00
period: 1d
basePeriod: 1h
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/
// © maizirul959

//@version=4
Strategy parameters
Strategy parameters
EMA1 length
EMA2 length
MACD Fast
MACD Slow
MACD Signal length
SMA1 Length
SMA2 Length
SMA3 Length
SMA4 Length
Line width
Source
RSI length
RSI signal length
PSAR_start
PSAR_increment
PSAR_maximum
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)