Type/to search

EintSimple Pullback Strategy

Common strategy
Created: 2024-01-15 14:04:54
Last modified: 3 years ago
1
Follow
1802
Followers

img

Moving Average Crossover EintSimple Pullback Strategy

Overview

The EintSimple Pullback Strategy is a mean reversion strategy based on dual moving average crossover. It first uses a long-term and a short-term moving average line. When the short-term moving average line breaks through the long-term moving average line from the bottom, a buy signal is generated. To filter false breakouts, this strategy also requires the close price to be higher than the long-term moving average line.

After entering the market, if the price falls back below the short-term moving average line again, it will trigger an exit signal. In addition, this strategy also sets a stop loss exit. If the retracement from the highest point reaches the set stop loss percentage, it will also exit positions.

Strategy Logic

The strategy mainly relies on the golden cross of dual moving averages to determine entry timing. Specifically, the following conditions must be met at the same time before opening a position to go long:

  1. The close price is greater than the long-term moving average ma1
  2. The close price is lower than the short-term moving average ma2
  3. There is currently no position

After meeting the above conditions, this strategy will take a full long position.

The exit signal judgment is based on two conditions. One is that the price falls back below the short-term moving average again. The other is that the retracement from the highest point reaches the set stop loss percentage. The specific exit conditions are as follows:

  1. The close price is greater than the short-term moving average ma2
  2. The retracement from the highest point reaches the set stop loss percentage

When either exit condition is met, this strategy will close all long positions.

Advantages

  1. Using dual moving average crossover combined with solid close prices to judge can effectively filter false breakouts.

  2. Adopting pullback entry can enter after the price forms short-term inflection points.

  3. With stop loss setting, it can limit the maximum drawdown.

Risks

  1. Dual moving average crossover strategies tend to produce frequent trading signals and may chase peaks and kill bottoms.

  2. Improper parameter settings of moving averages may result in overly smooth or overly sensitive curves.

  3. Overly loose stop loss settings will lead to enlarged losses.

Optimization

  1. Test different length combinations of long-term and short-term moving averages to find the optimal parameters.

  2. Compare the effects of using close price and typical price to determine moving average crossovers.

  3. Test adding filters like volume or volatility indicators.

  4. Backtest optimize the stop loss percentage to find the best setting.

Conclusion

The EintSimple Pullback Strategy is a simple and practical dual moving average pullback strategy. It effectively utilizes the directional functionality of moving averages while combining solid close prices to filter out false signals. Although this strategy is prone to frequent trading and chasing peaks and killing bottoms, it can be further improved through parameter optimization and adding filters. Overall, this is a great strategy for quantitative trading beginners to practice on and optimize.

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"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ZenAndTheArtOfTrading / www.PineScriptMastery.com
// @version=5
strategy("Simple Pullback Strategy", 
Strategy parameters
Strategy parameters
Strategy Parameters
MA 1 Length
MA 2 Length
Stop Loss Percent
Exit On Lower Close
Time Filter
Start Filter
End Filter
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)