Type/to search

Estrategia de seguimiento de tendencia RSI

Common strategy
Created: 2023-11-16 15:33:40
Last modified: 3 years ago
1
Follow
1802
Followers

Overview

This strategy combines the RSI indicator and weighted moving average for trend following trading. It goes long when RSI is above 60 and goes short when RSI is below 40, with the moving average verifying the trend condition. The 40-period RSI acts as a trend following indicator. The weighted moving average uses different weights to reduce the impact of short-term fluctuations. The strategy also employs stop loss and trailing take profit to control risks.

Strategy Logic

The strategy firstly calculates the RSI and weighted moving average. The RSI length is 20 periods and the weighted MA length is 20 with higher weights that reduce the impact of short-term volatility. It goes long when RSI is above 60 and weighted MA rate of change is below -1%. It goes short when RSI is below 40 and weighted MA rate of change is above 1%.

After opening long or short, stop loss and trailing take profit orders are placed simultaneously. The stop loss is set at 3 ATR from the current price. The initial trailing take profit activation is 4 ATR away, and trails in 3% increments. When price hits either stop loss or trailing take profit activation, the position will be closed.

The strategy also incorporates money management rules based on the fixed fractional position sizing approach. Whenever PNL hits a fixed amount, the order size is increased or decreased by a fixed amount.

Advantage Analysis

  • RSI indicator can effectively track trends
  • Weighted MA reduces the impact of short-term fluctuations, avoiding whipsaws
  • Trailing take profit allows profits to be maximized
  • Fixed fraction position sizing controls risk effectively

The overall edge is the ability to follow trends, while taking stop loss and trailing take profit measures to control risks, thus capturing significant gains in strong trends.

Risk Analysis

  • False signals from RSI may cause unnecessary trades
  • Forced to stop out when price breaches stop or trailing take profit levels, unable to keep following trends
  • Aggressive money management rules may lead to large losses

The main risks come from the reliability of RSI signals and the stop loss/trailing take profit settings. Incorrect parameters may result in unnecessary closing of trades or losses beyond risk appetite. Breaking stop loss/take profit may also force unwarranted stop outs, losing the chance to continue trend trading.

Solutions include optimizing RSI parameters or adding other indicators for signal confirmation. Adjust stop/trailing take profit levels based on different products and volatility conditions. Also be prudent with money management rules to avoid excessive risks.

Optimization Directions

  • Probar otros indicadores junto con RSI para confirmación de señales, por ejemplo, KD, MACD, etc.
  • Optimizar los parámetros de stop loss y trailing take profit según las características del producto y el rango de volatilidad.
  • Probar otras técnicas de gestión de capital, como el tamaño fijo de operación, la fórmula de Kelly, etc.
  • Añadir condiciones de entrada como rupturas de Bollinger, divergencias de RSI, etc.
  • Considerar añadir posiciones en tendencias fuertes.

Hay muchos aspectos que optimizar. Primero, identificar otros indicadores que complementen las señales del RSI. El siguiente paso crítico es optimizar los parámetros de stop loss y trailing take profit basándose en el rendimiento histórico. La gestión de capital también puede cambiarse a otros tipos. Por último, las condiciones de entrada y de adición pueden mejorarse para piramidar posiciones en tendencias fuertes.

Resumen

La estrategia de seguimiento de tendencia con RSI tiene una lógica clara: utiliza el RSI para la dirección de la tendencia y la media móvil ponderada para la confirmación. Su fortaleza radica en operar en tendencias, maximizando ganancias mientras los stops y la gestión de capital controlan los riesgos. Sin embargo, la fiabilidad del RSI y la optimización de parámetros necesitan mejoras. Podemos considerar mejorar los indicadores de señal, los parámetros de stop/trailing, los métodos de gestión de capital, etc., para hacer la estrategia más robusta en distintos productos.

Source
Pine
/*backtest
start: 2023-01-01 00:00:00
end: 2023-06-24 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/
// © gsanson66

Strategy parameters
Strategy parameters
RSI Settings
RSI Length
MA Settings
MA Type
MA Length
Strategy parameters
RSI Long Signal
RSI Short Signal
ROC MA Long Signal
ROC MA Short Signal
TP activation in multiple of ATR
Trailing TP in percentage
Money Management
Fixed Ratio Value ($)
Increasing Order Amount ($)
Backtesting Period
Start Date
End Date
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)