Help Center
Bots
CTA-Expert Bots

MACD-RSI Quantitative Help Documentation

4 days
245226 Read
26

1. What is RSI?

The Relative Strength Index (RSI) analyzes market buying and selling momentum by comparing the average closing gains and losses over a set period. This helps gauge the market's sentiment and strength, offering insights into future price trends and reflecting the overall market condition during a specific timeframe.

2. MACD-RSI Quantitative Strategy

The MACD-RSI quantitative strategy leverages standard MACD and RSI algorithms to capture market signals. Entry and exit conditions are as follows: Go long when DIF > DEM and the RSI value is greater than or equal to the threshold + 50; close long positions when DIF < DEM or the RSI value is less than or equal to 50 - threshold. In the chart below, the RSI threshold is set to 15. Entry and exit points are indicated by the arrows:

img

Go short when DIF < DEM and the RSI value is less than or equal to 50 - threshold; close short positions when DIF > DEM or the RSI value is greater than or equal to 50 + threshold. In the chart below, the RSI threshold is set to 15. Entry and exit points are indicated by the arrows:

img

3. How to Access the MACD-RSI Trading Entry (Using "Perpetual Contract MACD-RSI" as an Example)

Navigate to the menu bar—Trading Bots—Contract—CTA Expert Bots—MACD-RSI—Click Create Bot—Configure Parameters—Click Create, as shown below: 1

Backtesting: You can run a backtest before creating the MACD-RSI strategy.

Backtesting Process: Click the "Backtest" button, enter your desired parameters on the page, and click "Backtest." The system will automatically review historical data (by default, for the past month) and generate a backtest record for your reference in the "Backtest Records" section.

4. Parameter Configuration Explained

Leverage Multiplier: The leverage used for your investment, primarily for calculating order size.

Total Investment Amount: The total amount you invest, all of which is used as your margin.

Position Take-Profit: When the profit/loss ratio between the latest mark price and the average entry price reaches or exceeds the set take-profit ratio, the position will be closed at market price. This does not affect the normal operation of the strategy.

Position Stop-Loss: When the profit/loss ratio between the latest mark price and the average entry price is less than or equal to the set stop-loss ratio, the position will be closed at market price. This also does not affect the normal operation of the strategy.

Auto Stop-Loss Ratio: When the loss on your total investment reaches this ratio, the strategy will execute a full exit.

Fast Window, Slow Window, MACD Signal, Period: Standard MACD parameters.

RSI Period: The number of candlesticks (K-lines) used to calculate the RSI.

RSI Threshold: The RSI threshold, which must be greater than 0 and less than 50.

Order Size: The number of contracts executed when a signal is triggered.

Default Order Size Calculation:

Inverse Contracts:

s = (Margin × Latest Price) / (2 × 0.00075 + (1/Leverage))
size = s / Contract Size

Linear Contracts:

s = (Margin) / (2 × 0.00075 + (1/Leverage)) × Latest Price
size = s / Contract Size

The actual order size will be the smaller value between the default calculation and the user-set value.

5. Example Operation

After creating a strategy, users can find their running strategies under "My Bots" by clicking "Active Bots." When both the MACD and RSI indicators meet the entry criteria, the "Details" section of the strategy will display relevant position, order, and strategy information. If you wish to take profit or stop loss manually, you can choose to close the position or terminate the strategy. You can also clone the strategy or transfer funds as needed.

Gate reserves the final right of interpretation for this product.

Sign up now for your chance to win up to $10,000!
signup-tips