The PriceZoneOscillatorSX strategy generates Short Exit signals when PZO values reach certain levels. Downtrend and non-trending market conditions are considered in this strategy. To check for trend existence, PriceZoneOscillator strategies use the Average Directional Index (ADX). If the ADX indicates trending conditions, an exponential moving average (EMA) is used for defining trend direction. By default, the strategy employs the 14 period ADX and the 60 period EMA.

In case the trend mode is spotted (ADX > 18), Short Exit signals are issued when:

  • PZO values fall below the "-60" level and start to go up afterwards, or

  • the price is above EMA (uptrend) and PZO is positive.

In non-trending conditions (ADX < 18), these signals are issued when:

  • having surpassed the "-40" level, the PZO falls below the "-60" level and starts to go up, or

  • having surpassed the "-40" level, the PZO rises above zero while the price is above the EMA, or

  • having crossed the "-5" level from above, the PZO fails to reach the "-40" level and rises above "+15".

Input Parameters

Parameter Description
price The price for which the PZO and EMA are calculated.
length The number of bars used to calculate the PZO and the ADX.
ema length The number of bars used to calculate the EMA.

Further Reading

1. "Entering the Price Zone" by Walid Khalil and David Steckler. Technical Analysis of Stocks & Commodities, June 2011.