DonovanWall

Resampling Reverse Engineering Bands [DW]

This is an experimental study designed to reverse engineer price levels from centered oscillators at user defined sample rates.
This study aims to educate users on the process of oscillator reverse engineering, and to give users an alternative perspective on some of the most commonly used oscillators in the trading game.

Reverse engineering price levels from an oscillator is actually a rather simple, straightforward process.
Rather than plugging price values into a function to solve for oscillator values, we rearrange the function using some basic algebraic operations and plug in a specified oscillator value to solve for price values instead.
This process tells us what price value is needed in order for the oscillator to equal a certain value.
For example, if you wanted to know what price value would be considered “overbought” or “oversold” according to your oscillator, you can do that using this process.

In this study, the reverse engineering functions are used to calculate the price values of user defined high and low oscillator thresholds, and the price values for the oscillator center.
This allows you to visualize what prices will trigger thresholds as a sort of confidence interval, which is information that isn't inherently available when simply analyzing the oscillator directly.

This script is equipped with three reverse engineering functions to choose from for calculating the band values:
-> Reverse Relative Strength Index (RRSI)
-> Reverse Stochastic Oscillator (RStoch)
-> Reverse Commodity Channel Index (RCCI)
You can easily select the function you want to utilize from the "Band Calculation Type" dropdown tab.

These functions are specially designed to calculate at any sample rate (up to 1 bar per sample) utilizing the process of downsampling that I introduced in my Resampling Filter Pack.
The sample rate can be determined with any of these three methods:
-> BPS - Resamples based on the number of bars.
-> Interval - Resamples based on time in multiples of current charting timeframe.
-> PA - Resamples based on changes in price action by a specified size. The PA algorithm in this script is derived from my Range Filter algorithm.
The range for PA method can be sized in points, pips, ticks, % of price, ATR, average change, and absolute quantity.

Utilizing downsampled rates allows you to visualize the reverse engineered values of an oscillator calculated at larger sample scales.
This can be rather beneficial for trend analysis since lower sample rates completely remove certain levels of noise.
By default, the sample rate is set to 1 BPS , which is the same as bar-to-bar calculation. Feel free to experiment with the sample rate parameters and configure them how you like.

Custom bar colors are included as well. The color scheme is based on disparity between sources and the reverse engineered center level.

In addition, background highlights are included to indicate when price is outside the bands, thus indicating "overbought" and "oversold" conditions according to the thresholds you set.

I also included four external output variables for easy integration of signals with other scripts:
-> Trend Signals (Current Resolution Prices) - Outputs 1 for bullish and -1 for bearish based on disparity between current resolution source and the central level output.
-> Trend Signals (Resampled Prices) - Outputs 1 for bullish and -1 for bearish based on disparity between resampled source and the central level output.
-> Outside Band Signal (Current Resolution Prices) - Outputs 1 for overbought and -1 for oversold based on current resolution source being outside the bands. Returns 0 otherwise.
-> Outside Band Signal (Resampled Prices) - Outputs 1 for overbought and -1 for oversold based on resampled source being outside the bands. Returns 0 otherwise.
To use these signals with another script, simply select the corresponding external output you want to use from your script's source input dropdown tab.

Reverse engineering oscillators is a simple, yet powerful approach to incorporate into your momentum or trend analysis setup.
By incorporating projected price levels from oscillators into our analysis setups, we are able to gain valuable insights, make (potentially) smarter trading decisions, and visualize the oscillators we know and love in a totally different way.

I hope you all find this script useful and enjoyable!
오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?
For my full list of premium tools, check the blog:
https://wallanalytics.com/

Reach out on Telegram:
https://t.me/DonovanWall

코멘트

500 코인
+1 응답
This publication is now featured in our Editors' Picks. In the name of all TradingView traders, thank you for your valuable contribution to the TradingView community, and congrats!
+6 응답
Hi there,
Thank you for Sharing this .. Top above for sure . Uncle @balipour did share your page/work to the community. Keep the level above. Great work
+4 응답
You are the best!
+4 응답
Wonderful god gifted creation... you don't need any indicator, only price action, worth a million dollar. Also if you can make a small guidance note on how to trade, that would help many
+3 응답
@sg2019, The way you trade with this ultimately depends on your style. There are many ways to integrate it with your setup. There isn't a "one size fits all" solution for trading with this.

Play with the indicator. Experiment with it and take advantage of what you find to be useful for your trade setups.
+4 응답
sg2019 DonovanWall
@DonovanWall, if you can supplement this tool in a short video, that would help many
+1 응답
Thanks, so cool and useful.
+3 응답
Great script!
Really to the point and well explained!

Gr, JD.
+3 응답
@Duyck, Thanks man. I'm glad you like it!
+1 응답