Thus far we have examined only trend-following mean reversion systems. In reality, most mean reversion traders have no bias against countertrend trading. Thus, now I offer some nondirectionally biased mean reversion trading systems.
Although I am certain that there are instances in which ADX improves the performance of trend-following systems, in general I have found greater success with this indicator as a filter for mean reversion systems. Here we take the mean reversion Bollinger band system previously used and replace the 200-day moving average filter with ADX. This removes the directional or trend-following bias and replaces it with a filter that is intended to ensure a nontrending market condition.
In addition, as opposed to exiting with profits at the 20-day moving average, this system will exit based on a percentage of the asset's value at the time of trade initiation. Because certain assets are more volatile than others, we will set both the stop loss and profit exits at 2.5 percent of entry level for the E-mini S&P 500 and Japanese yen crosses. All other instruments will use a 1.25 percent move as the exit criteria.
Using CQG, the programming code for a Bollinger bands mean reversion system with ADX filter is written in this way:
Close(@)[−1] XBELOW BLO(@,Sim,20,2)[−1] AND ADX(@,9)[−1] < 20
Long Exit—Condition #1 set “Price” field to: