informanerd

Hybrid Overbought/Oversold Overlay

Introduction

This is a new representation of my well-known oscillator Hybrid Overbought/Oversold Detector overlaid on the chart. The script utilizes the following 12 different oscillators to bring forth a new indicator which I call it Hybrid OB/OS.

Utilized Oscillators

The utilized oscillators here are:
  • Bollinger Bands %B
  • Chaikin Money Flow (CMF)
  • Chande Momentum Oscillator (CMO)
  • Commodity Channel Index (CCI)
  • Disparity Index (DIX)
  • Keltner Channel %K
  • Money Flow Index (MFI)
  • Rate Of Change (ROC)
  • Relative Strength Index (RSI)
  • Relative Vigor Index (RVI/RVGI)
  • Stochastic
  • Twiggs Money Flow (TMF)

The challenging part of utilizing mentioned oscillators was that some of their formulas range are not similar and some of them does not have a mathematical range at all. So I used a normalization function to normalize all their output values to (0, 100) interval.

Overbought/Oversold Levels Calculation

I noticed that the levels which considered as OB/OS level by various traders for each of the utilized oscillators are so different, e.g., many traders consider 30 as OS level and 70 as OB level for RSI and some others take 20 and 80 as the levels, or some traders consider 20 and 80 as OS/OB levels for Stochastic oscillator. Also these levels could be different on different assets, e.g., OB/OS levels for CCI on EURUSD chart might be 80 and 20 while the levels on BTCUSDT chart might be 75 and 25, and so on.
So I decided to make a routine to automate the calculation of these levels using historical data. By this feature, my indicator would calculate the corresponding levels for the oscillators on current chart and then decide about the overbought/oversold situation of each one, which leads to a more accurate Hybrid OB/OS indication.
As the result, if all 12 individual oscillators say it's overbought/oversold, the Hybrid OB/OS shows 100% overbought/oversold, vice versa, if none of them say it's overbought/oversold, the Hybrid OB/OS shows 0, and so on.

The Overlaying Oscillator Problem!

A programming-related challenge here was that Pine Script assigns two separate spaces to the oscillators and the overlaid indicators, and the programmers are limited to use just one of them in each of their codes.
Knowing this, I was forced to simulate the oscillator space on the chart and display my oscillator as a diagram somehow. Of course it won't be as nice as the oscillator itself, because the relation between the main chart bars and the oscillator bars could not be obtained, but it's better than nothing!

Settings and Usage

The indicator settings contain some options about the calculations, the diagram display and the signals appearance. By default they are fine, but you could change them as you prefer.
This indicator is better to be used alongside other indicators as a confirmation (specially in counter-trend strategies I believe). Also it generates an external signal which you could use it in your own designed indicators as well.

Feel free to test it and also the former form of the Hybrid OB/OS. Good Luck!
오픈 소스 스크립트

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

면책사항

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

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