Type/to search

Trend Following Strategy Based on Multiple Indicators

Common strategy
Created: 2024-01-30 17:51:04
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy identifies trends by combining multiple indicators and sets trend tracking stop loss to lock in profits. It mainly uses Bollinger Bands, RSI, ADX and other indicators to determine entry timing, and uses ATR and Bollinger Bands for stop loss.

Strategy Principle

The main judgment indicators of the strategy are Bollinger Bands, RSI and ADX. When the price approaches the lower rail of the Bollinger Bands and the RSI is below 30, it is judged as oversold and long position is taken; when the price approaches the upper rail of the Bollinger Bands and the RSI is above 70, it is judged as overbought and short position is taken. In addition, if the ADX is above 25, it means that a trend has formed, which makes the long and short signals more effective.

After opening positions, the strategy uses ATR indicator and Bollinger Bands rails to set stop loss. Specifically, the ATR sets the maximum stop loss range. When the price reaches the maximum stop loss point, close the position; the Bollinger Bands rails set trailing stop loss points which update according to price movement.

Advantage Analysis

The strategy combines multiple indicators for judgement and uses stop loss mechanism to lock in profits and reduce risk. The main advantages are as follows:

  1. Using Bollinger Bands to judge overbought and oversold situations for reversal opportunities
  2. Combining with RSI indicator increases judgment accuracy
  3. ADX indicator determines trend formation to ensure correct trade direction
  4. ATR and Bollinger Bands trailing stop loss can maximize profit locking

Risk Analysis

There are also some risks for this strategy:

  1. Multiple indicators judgment leads to high chance of over-optimization
  2. Signals are less effective when Bollinger Bands range is too wide
  3. Improper stop loss trailing may lead to expanded losses

To address these risks, we can take the following measures:

  1. Multi-parameter optimization to prevent over-optimization
  2. Adjust Bollinger Bands parameters based on market volatility
  3. Test stop loss distance parameters to endure normal fluctuations

Optimization Directions

The strategy can also be optimized in the following aspects:

  1. Add position sizing to adjust position scale based on stop loss multiplier
  2. Add money management module to strictly control single stop loss amount
  3. Test other stop loss indicators like DMI, Envelop etc
  4. Add machine learning models to determine trend probability and improve performance

Summary

In summary, this is a relatively robust trend following strategy. By determining trend direction through multiple indicators and controlling risks through stop loss measures, it can achieve good return on investment. We have also proposed several aspects that the strategy can optimize. Further optimizations may lead to even better results.

Source
Pine
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
// THIS SCRIPT IS MEANT TO ACCOMPANY COMMAND EXECUTION BOTS
// THE INCLUDED STRATEGY IS NOT MEANT FOR LIVE TRADING
// THIS STRATEGY IS PURELY AN EXAMLE TO START EXPERIMENTATING WITH YOUR OWN IDEAS
Strategy parameters
Strategy parameters
main strat profit
Shorts on/off
Flipping on/off -> Go directly from long -> short or short -> long without closing
Stoploss on/off
Stoploss %
Trailing on/off
Trailing use ATR on/off
Multiplier for ATR
Trailing %
backtest date on/off
Backtest Start Year
Backtest Start Month
Backtest Start Day
Backtest Stop Year
Backtest Stop Month
Backtest Stop Day
Color Background?
ATR Length
1 for added ATR when selling
OC2 Length
1 for added OC2 when selling
OC2 multiplayer
DI Length
ADX Smoothing
smoothKRSI
smoothDRSI
lengthRSI
lengthStochRSI
RSI Source
RSI Buy Value
RSI Sell Value
lengthbb
Sourcebb
multbb
BB Buy Value
BB Sell Value
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)