Type/to search

Dual Direction Price Breakthrough Moving Average Timing Trading Strategy

Cryptocurrency
Created: 2023-12-15 16:28:12
Last modified: 2 years ago
1
Follow
1779
Followers

img

Overview

The Dual Direction Price Breakthrough Moving Average Timing Trading Strategy is a quantitative trading strategy that uses price breakthrough of moving averages to determine trading signals. It compares price with moving averages of specified periods and generates trading signals when price breaks through moving averages.

Strategy Logic

The core logic of this strategy is:

  1. Calculate moving averages (EMA) of specified period (e.g. 200 days) using EMA function.

  2. Compare close price with EMA to determine if price breaks through EMA. Specifically, when close price is above EMA, price breaks up through EMA; when close price is below EMA, price breaks down through EMA.

  3. Determine long and short signals based on breakthroughs. When price breaks up through EMA, generate long signal; when price breaks down through EMA, generate short signal.

  4. When signal is triggered, place order with certain percentage (e.g. 100%) and set stop loss and take profit prices.

  5. When stop loss or take profit price is touched, close position.

  6. Repeat the process to profit from timing of price breaking through moving averages.

The strategy is simple and straightforward to understand and implement. It aims to capture short-term momentum by signals of breaking through moving averages. But it also has certain lagging and whipsaw risks.

Advantages

  • Simple and clear logic, easy to understand and validate.
  • Smooth tracking ability utilizing characteristics of moving averages.
  • High trading frequency, suitable for short-term trading.
  • Quick response to price change, catching good timing.

Risks

  • Certain level of lagging, may miss initial breakthrough of price.
  • Frequent trading when whipsawed multiple times.
  • Risk of being stopped out on sharp reversals.

Optimization methods include parameter tuning, using more effective indicators, reducing trading frequency etc. Adaptive stops and filtering conditions can also control risks.

Optimization Directions

  • Test different types and parameters of moving averages for better solution, e.g. EMA, SMA, LWMA.
  • Add filtering conditions to avoid whipsaw trades, e.g. volume, Bollinger Bands, ATR etc.
  • Optimize and test stop loss and take profit strategies to lower risks.
  • Combine trend following, mean reversion and other strategies for robust trading system.
  • Add parametrization for wider adaptability.

Conclusion

The strategy has relatively simple logic of tracking moving averages to capture short-term momentum. Advantages include responsiveness and ease of use; disadvantages include lagging and inertia. Further optimizations can be done on indicator selection, stop loss mechanisms, filtering techniques to make the strategy more solid and comprehensive.

Source
Pine
/*backtest
start: 2022-12-08 00:00:00
end: 2023-12-14 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/

// Credits to the original Script - Range Filter DonovanWall https://www.tradingview.com/script/lut7sBgG-Range-Filter-DW/
// This version is the old version of the Range Filter with less settings to tinker with
Strategy parameters
Strategy parameters
Backtest Start
Backtest End
Long Stop Loss (%)
Short Stop Loss (%)
Long Take(%)
Short Take (%)
EMA Length
Swing Source
Swing Period
Swing Multiplier
Bar Colors On/Off
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)