Type/to search

Trend Following EMA and RSI Strategy

Cryptocurrency
Created: 2023-09-26 15:39:48
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy takes full advantage of moving averages and relative strength index to identify and follow trends. It only needs two indicators to determine the trend and find proper entry/exit timing. The strategy aims to capture medium-to-long term price trends while avoiding short-term market noise.

Strategy Logic

The strategy uses three EMAs with different periods, with EMA-A having the shortest period, EMA-B medium, and EMA-C the longest. When the shorter EMA-A crosses above the longer EMA-B, it signals an upward trend, thus going long. Conversely, when EMA-A crosses below EMA-B, it signals a downward trend, thus going short. To filter false signals, it also uses the longest EMA-C - only considering entry after the price breaks EMA-C.

The strategy also uses RSI to locate exit points. When long, it closes the position if RSI crosses above 70. When short, it exits if RSI falls below 30. This locks in trend profits and prevents losses from expanding further.

Advantage Analysis

  • Utilizes EMA's strength in trend identification
  • RSI assists in entry and exit timing
  • Simple strategy with only 2 indicators
  • Customizable parameters to adjust strategy style
  • Profits from early, mid and late trend stages

Risk Analysis

  • Pullbacks in major trends may generate false signals
  • Vulnerable to whipsaws in ranging markets
  • Improper RSI parameters may cause premature exits
  • EMA periods need careful selection, too short may be noise sensitive, too long may miss trends

These risks can be reduced by optimizing RSI parameters, adding filters, and combining with trend analysis.

Optimization Directions

  • Optimize RSI parameters for better profit taking and risk control
  • Test different EMA period combinations
  • Add volume or other confirmation indicators
  • Use ATR for stop loss sizing
  • Consider reducing position size mid-trend
  • Optimize entry timing with breakouts, volume, etc
  • Explore re-entry mechanisms

Summary

This strategy combines trend following and oscillator indicators for trend identification and capturing. With simple parameter and logic optimization, it can be greatly improved while keeping simplicity. It is a very practical trend following template suitable for medium-to-long term investors.

Source
Pine
/*backtest
start: 2023-08-26 00:00:00
end: 2023-09-25 00:00:00
period: 2h
basePeriod: 15m
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/
//@author Alorse

//@version=5
Strategy parameters
Strategy parameters
# bars
RSI
Length
Source
Moving Averages
EMA A Length
EMA B Length
EMA C Length
Strategy
Long entries
Short entries
Close after X # bars
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)