TradingView
ClassicScott
30 sie 2021 01:16

+ WaveTrend Oscillator 

DAO Maker / TetherKuCoin

Opis

I'm guessing most of you are familir with LazyBear's adaptation of the Wavetrend Oscillator; it's one of the most popular indicators on TradingView. I know others have done adaptations of it, but I thought I might as well, because that's kind of a thing I like doing.

In this version I've added a second Wavetrend plot. This is a thing I like to do. The longer plot gives you a longer timeframe momentum bias, and the shorter plot gives you entries and/or exits. Here we have one plot with a lookback period of 55, and another with the default set to 6 (change this to 14 if you think you might prefer something slower and that will plot similarly to the default RSI settings). With the traditional Wavetrend Oscillator there is a simple moving average on the WTO that is to help provide entries and exits. I've done away with this as there are already two plots, and I felt more would just clutter the indicator. Instead of plotting the SMA I've plotted the crosses along the bottom and top of the indicator. Also, as is not the case in LazyBear's version, this SMA length is adjustable. By default it is set to 3, which is the default setting on the original indicator.

I've also plotted background colors for when there is what I call a momentum shift. If one or the other oscillators crosses the centerline a colored bar is plotted. By default it is turned on for both WTOs, though in practice you might only want it on for the longer one.

I would say use of the indicator is similar to the original WTO or many other oscillators. Buying oversold and selling overbought, but being mindful of the momentum of the market. If the longer WTO is above the centerline it's best to be looking for dips to the centerline, or for an overbought signal by the faster WTO, and vice versa if the longer WTO is below the centerline. That said, you can also adjust the length of the SMA on the faster WTO to fine tune entries or exits, which is kind of how you would trade LazyBear's version. In this case you have that additional confirmation of market momentum.

You can set colored candles to either of the WTO plots via a dropdown menu.

There are alerts for overbought and oversold situations, centerline crosses, and Wavetrend crosses.

That's about it. Hope you enjoy this particular implementation of LazyBear's well known indicator.

Ah yes, last thing: Original version the source is set to hlc3. I've given you the opportunity to change that, so if you prefer using close you can, or whatever you want.

Informacje o Wersji

I've been adding auto-plotting divergences to my oscillator indicators over the past several days. In this edition I've made it optional to select whether they are drawn from the primary wavetrend or the secondary wavetrend.

I also added an additional candle coloring element for those who are very particular about candle colors. I've added an option that does not color in a gradient, but colors based on if the oscillator is in overbought or oversold zones, or somewhere in between. Additionally I've made it so that these zones are adjustable. There is information in the tooltip that I added, but essentially the thought is that you very rarely, in trending environments, see oscillators reverse all the way back to what might be considered oversold or overbought, but instead pullback anywhere from the center of the oscillator to maybe the mid section of the upper or lower half (if even that). Here you can adjust the level to where you might expect that pullback to come, so that, perhaps if you're not in a trade, you might receive some visual indication that here is a spot you might want to enter.
I likely went entirely overboard with this addition, but mostly it was just a port from something similar in my overlay version of the indicator that plots shapes at the top or bottom of the chart instead of coloring the candles. It's also probably only pertinent to people who use color to highlight things in specific ways, but, eh, like most of this stuff, you don't have to use it if you don't want to.

Below we see a chart with colors set to default settings. No color indications for spotting possible pullbacks, and a good amount of blue, illustrating a strong downtrend.


Here, I have the inputs adjusted so that '40' is set as "overbought", and now we see visual cues in the candles where we might want to place a short (or get out of an underwater long). Furthermore, I set the as "oversold" -80. That probably doesn't matter so much, and it might actually be more useful to set it to a less negative number, and use the plotted bull divs to get into some risky fade longs, if you like higher risk setups such as that.

Informacje o Wersji

fixed a display discrepancy in the style tab. carry on, nothing has changed. :)

Informacje o Wersji

added alerts for divergences

Informacje o Wersji

- updated to pinescript v5
- in the second wavetrend plot fixed what was supposed to be an SMA, but for some reason was an EMA, back to an SMA

Informacje o Wersji

- fixed an issue with changing the opacity of indicator plots--it actually works now
- added a couple of new candle color options, same as the overlay version

Informacje o Wersji

- just added an alert for the wavetrend crossing its moving average (the little blue and red dots above and below the oscillator)

Informacje o Wersji

- fixed a mistake in the calculation for second Wavetrend
- changed default values to calculations I prefer to use

Informacje o Wersji

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)
Komentarze
cryptodeesb
How do I activate the boxes?
ClassicScott
@cryptodeesb, You draw them yourself on the chart. I'm just depicting areas, as noted in the note on the chart, where you might look to enter a trade based on what I outlined in the text.
Tezza888
This is awesome. I would like to give a suggestion. Can you highlight the Vector candles so we know where they are. The colored candles right now are overlapping them. Thank you!
ClassicScott
@Tezza888, What are the "vector candles" you're referring to? There are only colored candles. If you're referring to the boxes and divergences drawn on the chart, well, I drew those to highlight a possible way of using the indicator. Sorry for any confusion.
SugarTrader77
Awesome. + visually beautiful. I am going to play with it a bit and see if I can benefits from your version. Really nice looking.
ClassicScott
@SugarTrader77, Thanks! The color.from_gradient that tradingview has added to scripting is really nice, and I love being able to reflect that in the candle color. That immediate visual impact I think makes it much easier to see what the indicator is doing without necessarily having to look at it.

I'm actually finishing up an overlay indicator reflecting this script, also, meaning symbols and/or background color will be applied to the price chart for what the longer period oscillator is doing, and plotting symbols above the candles for moving average crosses, and plotting symbols for overbought and oversold. It's frustrating that you have to make two different indicators for that, but it is what it is.
KryptoViking77
I really like this indicator. Works perfectly and well done.
lukricky
will it repaint please ? i just check this morning, it looks like it repainted after 15 mins to show the bear divergence ( i look at 5 mins bar)
Sunnyland99
Thanks so much, I tested over 100 scripts and yours are the best, I love how your mind works. Thanks
tinkl
I have a few questions:
1: Which time period does this indicator apply to? Long period or short period, such as 1H, 15m, or, 4h, 1D, 1W? Or look at the short or long trend in a long cycle and find a buying position in a short cycle?
2: If you only do one direction, such as long, can you directly buy according to the long brackground color as the indication point, because the signals of top deviation and bottom deviation are not very accurate, and the fault tolerance rate is relatively large
Więcej