REX Oscillator – Strategy, Rules, Settings, Returns, Backtest

The right trading tool enables you to enter the market cautiously but exit when there are signs of reversal, just as the professionals do it — one indicator that may help with that is the REX Oscillator. What do you know about this indicator?

In trading, the Rex Oscillator is a technical analysis tool that gauges the strength or weakness in the market based on the relationship of the closing price to the open, high, and low prices of the same price bar. The concept of the Rex Oscillator is based on the idea that a huge difference between the high and close prices of a price bar implies weakness, while a huge difference between the low and close prices implies strength.

In this post, we will take a look at most of the questions you may have about the REX Oscillator: what it is, how it works, and how you can use it to make your trading strategies better. Let’s dive in!

Key takeaways

  1. Purpose:
    The Rex Oscillator is a technical analysis tool used to gauge market strength or weakness during a trading session.
  2. Core Concept:
    • A long lower wick (close far from the low) signals strength.
    • A long upper wick (close far from the high) signals weakness.
    • The body of the candle (open to close) reflects the price gain or loss.
  3. True Value of a Bar (TVB):
    A calculated value based on the relationship among open, high, low, and close prices of a single price bar.
    The Rex Oscillator is essentially a moving average of the TVB.
  4. Oscillation Behavior:
    • It oscillates around a zero line.
    • Crossing above zero in a bearish trend suggests a bullish reversal.
    • Crossing below zero in a bullish trend suggests a bearish reversal.
  5. Usage:
    • Primarily used as an exit signal.
    • Can also be used for trade entries in the right market conditions.

In short, the Rex Oscillator helps traders interpret price bar wicks and bodies to anticipate potential trend reversals.

You might also want to look at our extensive list of trading indicators.

What is the REX Oscillator in trading?

In trading, the Rex Oscillator is a technical analysis tool that gauges the strength or weakness in the market based on the relationship of the closing price to the open, high, and low prices of the same price bar. The concept of the Rex Oscillator is based on the idea that a huge difference between the high and close prices of a price bar is a sign of weakness in the market, while a huge difference between the low and close prices is a sign of strength.

In other words, the indicator uses the size of the upper and lower wick of a price bar to assess the level of strength or weakness in the market during the trading period represented by the price bar. The body of the price bar, which is the difference between open and close prices, gives a measure of the market performance or price gain during the session. Thus, a long lower wick indicates strength while a long upper wick indicates weakness.

The indicator uses terminologies like the True Value of a Bar (TVB) to assess the health of the market based on how the close, open, high, and low prices of the same price bar are related to one another. The Rex Oscillator, which is a moving average of the TVB, indicates the inertia of the market. Its values oscillate above and below the zero line. When it crosses into the positive territory in a bearish trend, it signals a potential bullish price reversal.

Similarly, when it crosses into the negative territory in a bullish trend, it signals a potential bearish price reversal. As a result, traders generally use it as an exit signal. But in the right market situation, the signal can be used for trade entry.

An example of the REX Oscillator is shown here:

REX Oscillator
REX Oscillator

How does the REX Oscillator work?

The REX Oscillator works as a tool for measuring the strength or weakness of the price action based on the relationship of the closing price to the open, high, and low prices of the same price bar.

First, it measures the True Value of a Bar (TVB), which assesses the health of the market based on how the close, open, high, and low prices of the same price bar are related to one another. Then, it calculates a moving average of the TVB to get the REX Oscillator.

The relationship of the TVB to price bar patterns is unique. A bullish pin bar (long lower wick) gives a positive TVB, and this indicates strength in the market, regardless of whether the price bar has a bullish or bearish close. Conversely, a bearish pin bar (long upper wick) gives rise to a negative TVB, which indicates market weakness, regardless of whether the price bar has a bearish or bullish close.

The Rex Oscillator, which is a moving average of the TVB, indicates the inertia of the market.

The indicator’s values oscillate above and below the zero line. In a bearish market, the indicator line crossing into the positive territory signals a potential bullish price reversal.

Likewise, in a bullish market, the indicator crossing into the negative territory in a bullish trend signals a potential bearish price reversal. Thus, it can serve as an exit signal. But in the right market situation, the signal can be used for trade entry. For instance, its positive signal can be used to anticipate the end of a pullback in a bullish market.

REX Oscillator trading strategy- rules, settings, returns, and performance

Let’s backtest a trading strategy that uses the REX Oscillator – complete with trading rules and settings.

THIS SECTION IS FOR MEMBERS ONLY. _________________ BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES CLICK HERE TO SEE ALL 400 ARTICLES WITH BACKTESTS & TRADING RULES

We buy and sell at the close.

Commissions and slippage of 0.03% per trade are included.

This is more of a trend-following strategy, and thus, it works best for assets like gold and Bitcoin (and not for stocks).

This is the equity curve for Ethereum from 2018 until today:

REX Oscillator strategy
REX Oscillator strategy

The number of trades is 122, and the average gain per trade is 6%. The results are much better than buy and hold: 56% vs 31%, even though the strategy is invested just 53% of the time.

This is the equity curve for Bitcoin from 2014 until today:

REX Oscillator trading strategy
REX Oscillator trading strategy

It’s 180 trades with an average gain of 5.7%. It underperforms to buy and hold: 61% vs 66%, but is invested just 60% of the time. Max drawdown is 61% compared to 83% for buy and hold.

REX Oscillator strategy – complete code

The Amibroker code for the backtest looks like this:

THIS SECTION IS FOR MEMBERS ONLY. _________________ BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES CLICK HERE TO SEE ALL 400 ARTICLES WITH BACKTESTS & TRADING RULES

What are the main features of the REX Oscillator?

The main features of the REX Oscillator include:

  • The True Value of a Bar (TVB): This assesses the health of the market based on how the close, open, high, and low prices of the same price bar are related to one another. Specifically, it measures the difference between the sum of the differences between close and low and close and open and the difference between high and close.
  • The Moving Average Type: This can be a simple moving average (SMA), exponential moving average (EMA), weighted moving average (WMA), or smoothed moving average (SMMA). The moving average of the TVB gives the REX Oscillator.
  • The Period Length: This refers to the length of the period for the moving average of the TVB.
  • The Zero Line: This is the centerline of the indicator about which the indicator line oscillates. The zero level signifies an equilibrium in the market.

How do you calculate the REX Oscillator?

To calculate the REX Oscillator, you follow these steps.

Step 1: Calculate the TVB as follows:

TVB = (Close-Low) + (Close – Open) – (High – Close)

Or

TVB = 3 * Close – (Low + Open + High)

Step 2: Calculate the Rex Oscillator: This is given as:

n-period REX = moving average (n periods) of TVB

step 3: Repeat for any new price bar that forms and plot the data

What are the benefits of using the REX Oscillator?

The benefits of using the REX Oscillator include:

  • The indicator can be used as an exit signal since it shows when there could be a bearish reversal in an uptrend and a bullish reversal in a downtrend.
  • In the right market situation, it can be used to find entry points — for instance, a bullish crossover signal after a pullback in an uptrend can be a signal to go long, while a bearish crossover signal after a pullback in a downtrend can be a signal to go short.

How to interpret REX Oscillator signals?

To interpret REX Oscillator signals, you have to consider the direction of the trend and key market levels. Generally, when the oscillator crosses into the positive territory in a bearish trend, it signals a potential bullish price reversal, and when it crosses into the negative territory in a bullish trend, it signals a potential bearish price reversal. This is why it is usually seen as an exit signal.

However, in the right market situation, it can be used for entry signals too. For example, a crossover to the positive territory after a pullback in an uptrend can be a signal to go long, while a crossover to the negative territory after a pullback in a downtrend can be a signal to go short.

What trading strategies use the REX Oscillator?

Trading strategies that use the REX Oscillator include:

  • Trend-continuation strategy: This aims to trade in the direction of the main trend after a pullback to a key level. In a bull market, the pullback will be a countertrend bearish move. If the pullback gets to a key support level and the REX Oscillator crosses over to the positive territory, it means that the pullback is about to reverse for the uptrend to continue. This could be a signal to go long. Likewise, in a bear market, the pullback will be a countertrend price rally. If the pullback gets to a key resistance level and the REX Oscillator crosses over to the negative territory, it means that the pullback is about to reverse for the downtrend to continue. This could be a signal to go short.
  • Mean-reversion strategy: Here, the aim is to trade price reversal to its mean after it has traded significantly away from the mean. This is best used in a range-bound market. A bearish crossover at the resistance level can be a signal to go short and a bullish crossover at the support level can be a signal to go long.

What settings are used for the REX Oscillator?

The settings used for the REX Oscillator are mainly the moving average type and the period length. The moving average type can be a simple moving average (SMA), exponential moving average (EMA), weighted moving average (WMA), or smoothed moving average (SMMA). The period length refers to the length of the period for the moving average of the TVB. The default period length on TradingView is 21.

How does the REX Oscillator compare to other indicators?

Compared to other indicators, the REX Oscillator is a tool for measuring the strength or weakness of the market per price bar. It does this by comparing the differences between close and low, close and open, and high and close, and then, smoothing the data over a chosen number of periods.

The REX Oscillator is typically seen as an exit signal, unlike other oscillators, such as the RSI and stochastic, which are typically used to track price swings.

What are the limitations of the REX Oscillator?

The limitations of the REX Oscillator include:

  • It does not show the direction of the main trend, and thus, may not be useful as a standalone trading strategy.
  • It is typically seen as an exit signal and requires the help of other indicators or analysis tools to be used for entry signals.
  • It can give false signals a lot.

How to integrate the REX Oscillator into your trading plan?

To integrate the REX Oscillator into your trading plan, you have to understand how it works and have a strategy the indicator can fit into. Being an oscillator, the indicator can be used to create entry and exit strategies for your trading plan.

All you need is to find other indicators that can show the direction of the trend and the key support and resistance levels in the market. If your trading plan is to trade in line with the trend, you can use the REX Oscillator to get entry after a pullback to a key level.

Which timeframes work best with the REX Oscillator?

The timeframes that work best with the REX Oscillator will depend on your trading style and the result of your backtesting. If you’re a day trader, the hourly, 30-minute, and 15-minute timeframes may be the best for you.

For a swing trader though, the 4-hourly and daily timeframes are likely the more useful ones for trading and analysis. However, you will need to backtest to find out the timeframe that offers you an edge in the market.

Can the REX Oscillator be used in all markets?

Yes, the REX Oscillator can be used in all markets since it is calculated from the price data alone and all tradable financial markets have price data on their charts.

This is unlike volume-based indicators, which cannot be used in certain markets, like the spot forex market, where there is no central exchange to keep a record of the total trading volume. You can compute the REX Oscillator for any market.

How to combine the REX Oscillator with other indicators?

To combine the REX Oscillator with other indicators, you look for indicators that can complement it. Since it is an oscillator, it is best to combine it with trend indicators, like the moving averages, and support and resistance levels.

If you want to use it for mean-reversion trades, you may have to combine it with price channel indicators, such as the Bollinger Bands.

What are common mistakes when using the REX Oscillator?

The common mistakes when using the REX Oscillator include:

  • not combining it with other indicators to know when the market is trending
  • using it as a standalone strategy, which may expose you to trading against the trend
  • not having a reliable strategy with clear entry and exit criteria
  • not backtesting your strategy to be sure it has an edge in the market
  • not having a risk management plan.

How to customize the REX Oscillator for your needs?

To customize the REX Oscillator for your needs, you can follow these steps:

  • Create a REX Oscillator-based trading strategy and backtest it.
  • Experiment with different parameters during backtesting the strategy to find the ones that work best for the market you are trading.
  • Set up the indicator with the best-performing parameters from your backtesting.
  • Periodically evaluate the performance of the strategy to know when you need to change the parameters.

What is the history of the REX Oscillator?

The history of the REX Oscillator is not clear, as information about the indicator is very scanty. However, the first description of the indicator was by Clonex on QuantShare more than 11 years ago.

The indicator was described as a measure of market behavior based on the relationship of the close price to the open, high, and low prices.

Are there tutorials available for the REX Oscillator?

It is not clear whether there are tutorials available for the REX Oscillator by the author.

However, you can find some YouTube Channels that describe the indicator and how to use it. Checking a few of them may help you see how to use the indicator.

What do users say about the REX Oscillator?

Users’ comments about the REX Oscillator are not easy to find. The few comments available on TradingView vary a lot, with many focusing on the work of the programmer, rather than the usefulness of the indicator on their trading.

It is interesting to note that most REX oscillators on TradingView are modified and often combined with other indicators. So, the comments are not focused on the REX Oscillator itself.

How reliable is the REX Oscillator for trading?

The REX Oscillator can be reliable for trading if used with the right trading strategy and traded on a suitable trading timeframe.

To use the indicator effectively, you must combine it with other indicators or analysis tools to create a reasonable strategy. Then you backtest the strategy to be sure it offers a reliable edge.

What trading platforms support the REX Oscillator?

Many trading platforms support the REX Oscillator. They include cTrader, TradingView, QuantShare, ProRealCode, NinjaTrader, and many more.

You can check whether your trading platform supports the indicator or get a programmer to create a custom version in your platform’s language.

How to backtest the REX Oscillator?

To backtest the REX Oscillator, follow these steps:

  1. Identify and study the markets you want to backest the REX Oscillator.
  2. Formulate the REX Oscillator-based strategy that you want to backtest and state the parameters.
  3. Gather the historical data you need for the backtesting and divide the data into in-sample and out-of-sample data.
  4. Code the strategy into a trading algorithm.
  5. Run your backtesting on the in-sample data and optimize with the out-of-sample data, adjusting your parameters as needed.
  6. Evaluate the results of your backtesting

What are the REX Oscillator trading signals?

The REX Oscillator trading signals include:

  • Bullish zero-line crossover signal: This signal is formed when the indicator crosses above the zero line into the positive territory. It signals strength in the market and can be a signal to go long if market conditions are suitable for that.
  • Bearish zero-line crossover signal: This signal is formed when the indicator crosses below the zero line into the negative territory. It indicates weakness in the market. You can use that as a sell signal in a suitable market environment.

How to optimize REX Oscillator settings?

To optimize REX Oscillator settings, you have to use the indicator to create a reliable trading strategy first. Then, while backtesting the strategy, you experiment with different settings to find the one that offers the best performance.

Next, you retest these settings on different historical data (out-of-sample data) or in a real-time market to be sure the new settings are robust enough to perform well in the live market in real time.

What expert tips exist for using the REX Oscillator?

Here are some expert tips for using the REX Oscillator:

  • Do not use the indicator as a standalone strategy.
  • Combine the indicator with trend indicators or other forms of analysis.
  • If you want to use it for a mean-reversion strategy, combine it with a price channel and trade in a range-bound market.

Similar Posts