TradingView
ClassicScott
2021年10月25日晚上8點56分

+ REX Oscillator 

Algorand / BitcoinKuCoin

描述

So, what is the REX oscillator, you might be asking yourself.
"The Rex oscillator is an indicator that measures market behavior based on the relationship of the close to the open, high and low values of the same bar. A big difference between the high and close on a bar indicates weakness, and wide disparity between the low and close indicates strength. The difference between open and close also indicates market performance."

The True Value of a Bar (TVB) gives an indication of how healthy the market is. A negative close and a positive TVB (or vice versa) is an indication of the market building strength on the opposing side of the trend. The Rex oscillator is a moving average of the TVB value with the specified period.

I first came across this watching one of many No Nonsense Forex videos. Mostly, from comments I've read, it is used as an exit indicator for people who trade with a system similar or identical to the one VP espouses in his NNFX blog. I think it's perfectly apt to use as an entry indicator as well, or even as both, perhaps, depending on the moving average you chose to apply to the TVB.

There are a few other versions of this on tradingview, but I thought I'd make an updated version. Added Donchian Channels because I like the idea of a dynamic sort of overbought/sold area. I left out the basis because the indicator pivots around a center line, and has a signal line as well. A basis line just seemed like too much, and would likely not be very useful.

The additional usual things that I incorporate into my indicators are included here: optional candle coloring, alerts, and probably a too large selection of moving averages.

Credit to Nemozny for the FRAMA calculation. I may add that to other indicators I have.

發布通知

a user mentioned to me a tweak that I should make to the Jurik Moving Average, so I have done so. It's a simple thing, changing the power value from an integer to a float so that you can fine tune the MA more so than whole integers would allow.

also made the donchian channel band thickness adjustable. Anywhere from 3 on up is fine. Once you get past around 8 it's pretty negligible changes though. Smaller numbers are wider (2 would basically start the bands at the basis), and the bands can only go so thin, hence why anything beyond 8 doesn't change much.

發布通知

made a few minor tweaks in the case of language, but the big update, as suggested in the comments (and something I was thinking about implementing anyway) is adding divergences to the indicator. Thanks to AtomOfScent for the suggestion (and also the suggestion for the change in the JMA).
I've actually added this across all my oscillating indicators, because why not. In the case of the REX Oscillator I've set it so that you can set divergences to plot from either the REX or the Signal Line.

發布通知

added alert conditions for divergences

發布通知

-conversion to pinescript v5
-added T3, RMA, and UMA moving averages for REX and as signal line
-added option for plots for signal line crosses
-added histogram option. This works the same as it does for MACD. It's just measuring the distance between the REX and Signal line
-histogram is also selectable as a candle coloration option and as a divergence option

發布通知

-added an alert for histogram crossing the center line

發布通知

I'm publishing updates to all of my indicators, so I'm just going to comment on everything here since most of the updates are common across most of my indicators.

User Non-Visible Updates (basically backend stuff that makes:
- changes in code legibility and consistency across all indicators (basically standardizing the coding across as many indicators as possible)
- implementation of libraries into my indicators; which helps significantly in doing what I typed above; which in turn will make creating any new indicators, if they are of the type to use these libraries, much simpler
- updated descriptions for all indicators, which should (it's possible I've forgotten things) reflect changes I've made recently and any I may have made in the past after first publication (this is very minor, but as I was changing so much I thought I may as well--I don't intend to update these much, if at all, in the future)

User Visible Updates:
- as I mentioned everything now uses my moving averages library and volatility bands library--this cuts down the total amount of code significantly, and has made it easier for me to add moving averages, or volatility bands to these indicators because I only had to/have to add it one time (to the library) rather than multiple times across all indicators*
- since creating these libraries I've added several new moving averages (Kaufman Adaptive, Laguerre Filter, McGinley Dynamic (doesn't work for all), and Zero-lag) to them while retaining all the previous with the exception of the UMA, which wasn't implemented consistently across all indicators anyway
- eliminated having two Bollinger Bands with different standard deviations and a fill between them in exchange for one with the band fill implementation that I use on my Donchian Channels Bands
- part of my code consistency across all indicators resulted in a much needed organization of the 'style' tab

*(affects all but the Wavetrend Oscillator, Wavetrend Oscillator Overlay, Jurik KDJ, Average Candle Bodies Range, Bollinger Bands Width, ALMA Trend Detector, Ultimate Moving Average, Donchian Channels, and Dynamic Donchian Channels)
評論
ClassicScott
It's a good indicator for finding divergences as well, I forgot to add in the introduction. The trend/divergences drawn were drawn by me. Not part of the indicator.
AtomOfScent
@ClassicScott, it was super easy to add. I just copied the code from the built-in Divergence Indicator (except for the RSI parts) and changed osc = rsi(source, length) to osc = signal_ma :)
AtomOfScent
This looks really promising. Great job on the styling and additional options. :)
AtomOfScent
@AtomOfScent, minor suggestion: the power variable for JMA should be a float and the min value should be 0.1. I find small differences can make a big difference and values below 1 can be useful to for shorter periods. I like to use steps of 0.1-0.25 for power and 10 for phase. I might try adding adaptive length options (Ehlers) to see if that improves the results at all...
ClassicScott
@AtomOfScent, I much appreciate the suggestion! Will go ahead and change that through all my indicators. Let me know what you find re: Ehlers. I don't come from a computer science or mathematics background, so all this has become a bit of an odd hobby that seems to scratch a creative and analytical itch. I started fiddling with B Bands %B as a result of watching a bunch of No Nonsense Forex videos, and I've just been going a little deeper ever since. I'll probably never be any good at writing anything particularly novel (though I have a couple of ideas that I'm going to need to open a Stack Overflow account for, so that I can ask some questions), but updating some commonly (or less commonly) used indicators, and adding various options to them that I think could make them even more helpful for traders determining a trade entry or exit has become something I've enjoyed.
AtomOfScent
@ClassicScott, it seems like we're in the same situation. You're doing a great job so far so definitely keep going! :)
GodWilling
The DC lines do some interesting things, really well done here. Thank you
ClassicScott
@GodWilling, Thanks! Glad you like! I like the DC band a lot too. It's nice to have an "overbought" or "oversold" region on indicators that don't have that sort of bounds as a way of determining momentum, or loss of. Plus, they often act as resistance or support on price throwbacks to logical support/resistance areas.
tyler8910
nice work
ClassicScott
@tyler8910, Thanks, mate. Much appreciated!
更多