Type/to search

Adaptive Trading Strategy Based on Multiple EMA Crossovers

Cryptocurrency
Created: 2023-09-26 14:41:00
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy implements adaptive long/short trading using multiple sets of EMA indicators. It adopts EMAs with different parameters for entry and exit based on market long-term and short-term trends. The strategy automatically recognizes bull/bear market and uses independent stop loss to control risk.

Strategy Logic

The strategy mainly utilizes the crossover principle of EMA indicators. Long when fast EMA crosses above slow EMA, and short when crossing below. It sets up multiple EMAs and chooses different parameters based on market trends. Specifically, when judging long-term trend is bullish, a set of longer period EMAs are used for long signal; when bearish, another set of shorter period EMAs are used for short. Exits also adopt different period EMAs. Stop loss uses fixed percentage trailing stop based on position direction.

Advantage Analysis

  • Multiple adaptive EMA sets work flexibly across different markets.
  • Distinguishing bull and bear makes signals clearer.
  • Independent entry/exit parameters enables precise positioning.
  • Fixed percentage stop loss effectively controls risk.
  • Strategy logic is intuitive and easy to understand and implement.

Risks and Improvements

  • EMAs can generate false signals, parameter tuning is key.
  • Fixed stop loss may fail to track large fluctuations.
  • Should add filters like volume to enhance robustness.
  • Parameters can be auto optimized with machine learning algorithms.
  • Consider using dynamic stop loss like ATR instead of fixed.

Summary

The strategy achieves adaptive effect leveraging multiple EMA crossovers, keeping EMA’s advantages and making the strategy more flexible. With proper filters and dynamic stops added, it can become a highly practical automated trading system.

Source
Pine
/*backtest
start: 2023-08-26 00:00:00
end: 2023-09-07 00:00:00
period: 12h
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/
// © str1nger
//@version=4
Strategy parameters
Strategy parameters
Start Date
Start Month
Start Year
End Date
End Month
End Year
Long Open - Fast
Long Open - Slow
Long Close - Fast
Long Close - Slow
Short Open - Fast
Short Open - Slow
Short Close - Fast
Short Close - Slow
Long Stop Loss (%)
Short Stop Loss (%)
Long-term trend - Longs
Long-term trend - Shorts
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)