PriceSwing

Description

The Price Swing strategy is a swing trading technical indicator introduced by Domenico D'Errico. This strategy adds entry and exit simulated orders when a swing (a rapid price move of either direction) of a specified type is detected.

The strategy recognizes four types of swing:

  • Pivot High-Low. This is a basic pivot point detection method: an upswing is detected if the low price first falls below its previous value, but then rises. Conditions for the downswing are vice versa, based on the high price.
  • Bollinger Bands® crossover. An upswing is detected if the price crosses above the lower plot of the Bollinger Bands®. A downswing is detected when the price crosses below the upper plot of the Bollinger Bands®.
  • RSI Crossover. An upswing is detected if the RSI crosses above the oversold level (which is set by default to 40). A downswing is detected when it crosses below the overbought level (the default value is 60).
  • RSI + Higher Low/Lower High. An upswing is detected if the current low price is greater than its previous value while the RSI is below oversold. A downswing is detected if the current high price is less than its previous value while the RSI is above overbought.

The strategy adds a simulated buy-to-open order every time the upswing is detected. Sell-to-open simulated orders are added at downswings. Exits are provided when a specified period of time elapses, which defaults to 20 bars.

Input Parameters

Parameter

Description

swing type

Defines the type of swing to be looked for on chart.

length

Defines the length with which the Bollinger Bands® and the RSI will be calculated.

exit length

Defines the time period, completing which will have the strategy add a matching simulated exit order.

deviations

Defines the deviation multiplier for the Bollinger Bands®.

overbought

Defines the overbought level.

oversold

Defines the oversold level.

average type

Defines the average type for the calculation of the Bollinger Bands® and the RSI.

Bollinger Bands® is a registered trademark of John Bollinger.

Further Reading

1. "Detecting Swings" by Domenico D’Errico. Technical Analysis of Stocks & Commodities, May 2017.