Envelope Pullback Strategy

Table of Contents

The Envelope Pullback strategy uses shifted moving averages and a reversal pattern for position entry with averaging.

Key Parameters

  • Timeframe: Primary lower timeframe for operation
  • Higher Timeframe: Higher timeframe on which moving averages are calculated
  • Slippage Percentage: Percentage added to the limit order price to guarantee execution
  • Maximum Number of Active Pairs: Number of trading pairs on which the bot can simultaneously hold open positions

How It Works

On the higher timeframe, two moving averages are built. The first moving average MA Opening is the line from which all levels for opening a position will be calculated. On the screenshot, you can see the green line (MA Opening) and 4 levels for building a position below (white lines). The red line is MA Closing, which is the level at which a limit order to close the position is placed.

Position Opening Condition

A position is opened when the price drops below the position opening level (first white line) and the lower timeframe candle closes as bullish. Then on the next candle, the position is opened with a limit order. Why not market? A market order can result in large slippage. Therefore, we open with a limit order but set the allowable slippage in the configuration.

For example, slippage of 1%. Then at a price of 100, the purchase will be a limit order at price 101. That is, slippage above 101 will not occur, since we limit it with the limit price.

The condition to open a position when a bullish candle has formed allows us to enter or add to a position when the price forms reversal behavior. During such drops as on October 12, this will allow taking a position at low prices as shown in the screenshot below:

Strategy Backtest

The strategy backtest can be performed on TradingView. Link to the strategy: https://www.tradingview.com/script/flqvZtdJ-Merovinh-Envelope-Pullback/

Compared to the classic envelope strategy, this one provides a better profit-to-risk ratio and a better Sharpe ratio. Example of one of the backtests for this strategy compared to the classic envelope.

Classic envelope (position opens at defined levels):

Pullback envelope (position opens after formation of a reversal pattern):

Testing should be done on the lower timeframe. Example of my backtest on BNB:

  • MA Opening length = 3
  • MA Closing length = 1
  • Higher Timeframe = 4h
  • Enable LONGs = true
  • Enable SHORTs = false
  • Long1 = 5%, Lot1 = 10
  • Long2 = 10%, Lot1 = 20
  • Long3 = 15%, Lot1 = 30
  • Long4 = 20%, Lot1 = 40

Bot Configuration Example

Share :