Type/to search

Trend Trading Strategy Based on Price Channel of Double Moving Averages

Common strategy
Created: 2024-01-31 10:37:13
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This is a trend following strategy based on the price channel built with double moving averages. It uses the channel range to determine the price trend direction and sets a trailing stop loss to lock in profits.

Strategy Logic

The double moving average price channel strategy uses fast EMA and slow EMA to build the price channel. The fast EMA has a parameter of 89 periods and the slow EMA has a parameter of 200 periods. At the same time, three EMAs based on high price, low price and close price are used to build the channel range. The upper rail and lower rail of the channel are 34-period high price EMA and low price EMA respectively.

When the fast EMA is above the slow EMA and the price is below the lower rail, it is determined as an upward trend. When the fast EMA is below the slow EMA and the price is above the upper rail, it is determined as a downward trend.

During an upward trend, the strategy will open short positions when the trend reversal is identified. During a downward trend, the strategy will open long positions when the trend reversal is identified.

In addition, the strategy has a trailing stop loss function. After opening positions, the trailing stop loss price will be updated in real time to lock in profits.

Advantage Analysis

The biggest advantage of this strategy is that it uses the double moving average price channel to determine the price trend, combined with reversal trading to avoid chasing highs and selling lows. At the same time, it has a trailing stop loss function to lock in profits and reduce the risk of losses.

Other advantages include: large parameter optimization space that can be adjusted for different products and cycles; real-time update of stop loss price with low operating risk.

Risk Analysis

The main risk of this strategy is that the effectiveness of identifying reversal signals may not be ideal and misjudgments may occur. In this case, parameters need to be optimized to ensure the effectiveness of determining trend reversals.

In addition, the setting of stop loss points is also very critical. If the stop loss point is too high, the stop loss may not be decisive enough. If the stop loss point is too low, there may be excessive stop loss situations. This needs to be adjusted according to specific products.

Finally, data problems can also lead to strategy failure. It is necessary to ensure that credible, continuous and sufficient historical data is used for backtesting and live trading verification of the strategy.

Optimization Directions

The main areas for optimizing this strategy include:

  1. The periods of the fast EMA and slow EMA can be optimized by testing different parameter combinations to determine the effect

  2. The parameters of the upper and lower rails of the price channel can also be adjusted to find more suitable cycle parameters

  3. The setting of stop loss points is critical and can be optimized by testing different parameters

  4. Test whether introducing other indicators to determine trend reversal can improve trading performance

Conclusion

The overall operation process of this strategy is reasonable and smooth. It uses the double moving average channel to determine the trend direction for trading, and has a trailing stop loss to lock in profits. Through parameter optimization and risk management optimization, this strategy can become an efficient quantitative trading strategy.

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

//@version=4
strategy("Trend trader Strategy", overlay=true)

//f you want to trade shallower Pullbacks for quicker scalps, try reducing the 
Strategy parameters
Strategy parameters
From Day
From Month
From Year
To Day
To Month
To Year
High Low PAC channel Length
fastEMAlength
mediumEMAlength
slowEMAlength
ShowFastEMA
ShowMediumEMA
ShowSlowEMA
ShowHHLL
ShowFractals
Show Ideal Fractals Only
Show coloured Bars around PAC
Show Buy/Sell Alert Arrows
Pullback Lookback for PAC Cross Check
Show Alert Arrows Only on Closed Candles
ShowTrendBGcolor
Use Heikin Ashi Candles in Algo Calculations
Trail Long Loss (%)
Trail Short Loss (%)
ATR Range
* ATR Buy SL
* ATR Sell SL
* ATR TP1
move to entry in % towards target
Show Move to Entry points
tp
sl
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)