ClassicScott

+ Klinger Oscillator

ClassicScott 업데이트됨   
This is a version of Stephen J. Klinger's, Klinger Oscillator (sometimes called Klinger Volume Oscillator). I've changed virtually nothing about the indicator itself, but added some lookback inputs for the EMAs the oscillator is derived from (traditionally 34 and 55), and added a few other things, as is my wont.

But what is the Klinger Oscillator? Essentially, the calculation looks at the high, low, and close of the current period, and compares that to the previous period's. If it is greater, it adds volume, and if it is less, it subtracts volume. It then takes an EMA of two different lookback periods of that calculation and subtracts one from the other. That's your oscillator. There is then made a signal line of the oscillator that a trader can use, in combination with the zero line, for taking trades. Investopedia has a good article on it, so if you're looking for more specifics, check there.

What I've done is add a selection of different moving averages that you may choose for the signal line. Usually it's a 13 period EMA, and that comes default, but here you could use an ALMA or HMA, or modular filter, etc. Find something that works for your style/algorithm.

Of course there are all the usual additions of mine with the various ways of coloring the indicator and candles, adjustable Donchian Bands, and alerts. A new addition that I've just added to all my indicators (oscillators, anyway) are divergences. This is more or less just a copy and paste of the divergence indicator available in TradingView. In this case you can set it to plot divergences off either the Klinger or the signal line. Depending on which one you choose you may have to adjust pivot lookbacks, and lookback range. I've kept the settings default from the RSI TradingView version.
릴리즈 노트:
added alerts for divergences
릴리즈 노트:
- updated to pinescript version 5
- added VWMA and RMA (Wilder's, or smoothed, moving average) to signal lines
- added little plots for signal line crosses
- added a 'Center Line' selection for colored candles and the oscillator, so, bullish color above center line, bearish below
릴리즈 노트:
so, the default source for the Klinger Oscillator is hlc3. I just only realized this while looking things over and thinking of a different implementation of it. I decided to try it using 'close' as the source, and I thought to myself that I should make the source something the user can select for his/herself. Now you can select close, hlc3, or whatever else you may want.
릴리즈 노트:
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.

Specific to the Klinger Oscillator I've added a second signal line so you can eliminate the og Klinger and use the primary signal line as a smoothed version of the Klinger Oscillator. This should help with eliminating false signals.

See below image for a smoothed version of the oscillator.

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)

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?