This is an experimental hybrid between relative strength and spectrum analysis methods aimed to deliver useful insights about cyclical dominance and momentum. This study utilizes a modified RSI formula and a modified Goertzel algorithm to determine relative strength and spectral dominance for periods 8 through 50. These periods are theorized by many analysts to be the main cyclical components of market movement.
In this study, you are given the option to apply equalization (EQ) to the dataset before estimating strength. This enables you to transform your data and observe how strength estimates changes as well. Whether you want to give emphasis to some frequencies, isolate specific bands, or completely alter the shape of your waveform, EQ filtration makes for an interesting experience. The default EQ preset in this script cuts low end presence, dampens high frequency oscillations, and cleanly passes main cyclic components. There are many ways to use EQ to transform your dataset, so play around with the settings and find the presets that work best for your analysis setup.
After EQ processing, the data is then passed through the modified RSI algorithm to generate momentum information The modified RSI in this script is rescaled to oscillate between -1 and 1, and has the option to pass through a 2 pole Butterworth low pass filter before and after processing for a smoother output. The strength thresholds are determined by the threshold value, which quantifies distance above and below 0. The threshold value can also be thought of as conventional RSI distance from 50 rescaled so that an increment of 0.1 is equivalent to an increment of 5 on a conventional RSI. A threshold value of 0.4 is equivalent to thresholds of 70 and 30 on a conventional RSI, so this is the default. The maximum threshold value is 1, which is equivalent to thresholds of 100 and 0.
This script plots colored sections for each period value using a gradient color scheme based on their respective strength estimates. The color scheme in this script is a multicolored gradient that shows green scaled colors for bullish strength and red scaled colors for bearish strength. Darker, less vibrant colors indicate lower strength. Brighter, more vibrant colors indicate higher strength. Strength values near 0 will show the darkest colors, and values near the positive or negative threshold value will show the brightest.
The data is fed parallel through the modified Goertzel algorithm to obtain cyclic power information and to estimate the dominant cycle. Gerald Goertzel's algorithm is a unique Fourier related transform that identifies tonal properties by quantifying resonance in a set of second order IIR filters with direct-form structure. It is computationally more efficient than typical DFT or FFT algorithms, and yields decent spectral resolution. In this variation of the algorithm, data is first passed through a 2 pole high pass filter to attenuate spectral dilation, then passed through a Hamming Window to tidy up the frequency range. The clean windowed data is then passed through a recursive resonance loop over the frequency block to calculate filter coefficients, which are then used to identify real and imaginary magnitude components. From there, the magnitude components are used to calculate cyclic power. The power outputs of each period are then compared for dominant cycle estimation, which is plotted over the gradient. The dominant cycle can also be optionally smoothed or halved based on your preferences.
Bar colors are included in this script. The color scheme is a gradient based on dominant cycle momentum.
Signals and alert conditions are included in this script as well, and can be customized to your liking. The two main signal types in this script are: -> Dominant Cycle - Signals based on dominant cycle or half dominant cycle changes from positive to negative strength or vice versa. -> Confluence - Signals based on confluence emergence. Based on the majority of measured cycles or all measured cycles showing positive or negative strength.
The signals in this are also externally accessible by other scripts. The output format is 1 for long signals, and -1 for short signals. To integrate these signals with your own system, use a source input in your script and assign it to this script's "Direction Signals" output variable from the dropdown tab.
In addition, I included two external output variables that show dominant cycle strength and average cycle strength. They can be integrated into your own scripts by using a source input and selecting the proper output variable, just like the signals.
The Strength Analyzer is a versatile and powerful analytical tool to have in the arsenal for generating unique insights about momentum and cycle dominance. By analyzing strength on a spectral basis, we can look at relative price movements on a deeper level and gain insights that aren't necessarily obvious from simply looking at a price chart.
------------------------------------------------
This is a premium script, and access is provided on an invite-only basis.
To gain access, get a copy of the script overview, or for any other inquiries, send me a direct message!
I look forward to hearing from you!
------------------------------------------------
General Disclaimer: Trading stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in stocks, futures, Forex, options, ETFs or cryptocurrencies. Don’t trade with money you can’t afford to lose. This is neither a solicitation nor an offer to Buy/Sell stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument. No representation is being made that any account will or is likely to achieve profits or losses of any kind. The past performance of any trading system or methodology is not necessarily indicative of future results.
Because TV's UI can't handle displaying style options for 43 fills with 42 colors, the color scheme of the analyzer is currently not editable. However, no other sacrifices to functionality or quality were made in this project. As the TV team performs updates on the platform, the ability to customize this color scheme will likely come as well.
Also, it's important to note that this script uses a heavy amount of calculations to generate this output. At times (very infrequently), TV will throw an error message saying "Calculation Takes Too Long", likely due to a momentary lull in available server space. If you receive this error, simply hide then unhide the indicator, and everything should function as expected.