Type/to search

EMA Oscillation Reversal System Strategy

Cryptocurrency
Created: 2023-10-18 12:23:13
Last modified: 3 years ago
1
Follow
1781
Followers

img

Overview

This strategy uses a moving average system to determine trend direction and combines volatility index to avoid low volatility oscillating markets, with chandelier exit to manage trades.

Principle

The strategy judges trend direction by comparing fast and slow moving averages. It goes long when fast MA crosses above slow MA, and goes short when fast MA crosses below slow MA. To avoid oscillating markets, the strategy also incorporates Bollinger Bands. It generates trading signals when the rate of change of BB width exceeds a threshold. Finally, the strategy uses Chandelier exits as stop loss to avoid being trapped in range-bound markets.

Specifically, the trading logic is as follows:

  1. Calculate fast MA (default 20-day) and slow MA (default 50-day).

  2. Calculate the rate of change of Bollinger Band (default 40-day, 2 standard deviations) width.

  3. Go long when fast MA crosses above slow MA, and BB width change rate exceeds default threshold 9%.

  4. Go short when fast MA crosses below slow MA, and BB width change rate exceeds default threshold 9%.

  5. Calculate Chandelier long and short stops.

  6. Long stop is highest high - ATR * multiplier. Short stop is lowest low + ATR * multiplier.

Advantages

  1. MA system effectively tracks trends.

  2. BB width change filters out oscillation, reducing unnecessary trades.

  3. Chandelier exits timely stop losses avoiding being trapped.

  4. Multiple adjustable parameters for optimization.

  5. Clear logic, easy to understand and implement.

Risks

  1. MA lag may miss fast reversals.

  2. Improper BB parameters may filter valid signals.

  3. Excessive chandelier exits cause over-trading.

  4. Inadequate parameter optimization leads to holding risks.

  5. Unable to adapt to extreme market changes from major events.

Optimization

  1. Test different MA combinations to find optimal parameters.

  2. Test different BB periods for best volatility filter.

  3. Add other indicators for entry confirmation.

  4. Introduce dynamic stops to better track markets.

  5. Utilize machine learning to auto-optimize for changing markets.

Summary

This strategy integrates MA system, BB indicator and chandelier exits to form a relatively stable trend following system. Proper parameter optimization can achieve good results. But risks of trend reversal and oscillation remain. Machine learning can further enhance robustness. Overall a good strategy for learning.

Source
Pine
/*backtest
start: 2022-10-11 00:00:00
end: 2023-10-17 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/
// © juanchez

//@version=4
Strategy parameters
Strategy parameters
highest high o lowest low period
multiplicador
moving averages period
moving averages period2
moving averages type
Bollinger bands 1 period
Bollinger band 1 source
Bollinger Bands 1 factor
Show Bollinger bands 1
widen %
enable long
enable short
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)