TradingView
ImmortalFreedom
10 jan 2022 05:25

Chirped Sine Wave Generator 

Beskrivning

INTRODUCTION:
The title pretty much sums up what this tool is, but not what it's for. It's NOT an indicator, just a chirped sine wave generator intended as a developer tool. Basically it sweeps from a very high frequency near the "Nyquist frequency" by chosen starting, step, and repetition rates to an ever decreasing lower frequency. This is typically viewed best on ALL, 5Y, or 1Y charts starting at bar_index==0 onward. Also, with the chart interval being intraday, you may use (ALT + SHIFT + ◀) keyboard shortcuts to jump back to barstate.isfirst. I will say, to witness a much broader scope of the sweep, having 4K is better for viewing it with the highest detailed resolution when making comparisons.

VISUAL AIDS:
When a frequency steps to another frequency a label displays the cycle period of the new frequency. This may be disabled to remove it's obstruction of view when overlaying indicators on top of it. I also included RMS levels that may be enabled.

USAGE:
As you can see above, I sourced TV built-in indicators to the "cSine Wave" plot, having varying results across the varying frequencies generated. Oscillating indicators and filters (ema, sma, etc...) of all sorts can be applied to it to inspect lag, amplitudes, or anomalies that render across the flux on the sweeping sine wave. Keep in mind market data has near infinite frequencies existing at any given time that can pop up or disappear instantly, so performance in theory on this swept synthetic waveform does not equate to performance on ANY ticker. It's gives you "ONE" totally different perspective to evaluate novel indicators.

OBSERVATIONS:
Witnessing the antiquated RSI on higher short frequencies, you will see it has a few issues, hmm. The amplitude is clamped near 50 at the Nyquist frequency growing with increasing amplitude in a funnel like shape. That doesn't imply it's a bad indicator, only there could be room for improvements... potentially. Wilder was calculating the RSI on paper basically, and the calculations were made as simple as possible in late 1970's. With advances in modern computing, many exotic permutations of RSI now exist attempting to improve upon it's original characteristics. EMA sourced to this tool appears in similar fashion to the RSI with it's own peculiarities. I suspect this occurs because EMA and RSI both use an IIR filter. CCI has a better representation across the spectral flux in this case, but that doesn't imply it's a perfect indicator on market data either. CCI could be improved as well...

REVELATIONS:
The chirped sine wave is only revealing a partial story about RSI's, EMA's, and CCI's attributes. In conclusion, how various frequencies affect our indicators, can be a bit more visually obvious using this tool, but it doesn't reveal all. For example, a 3D-RSI tells a different story when viewed in that perspective. Using a chirped sine wave, observations of ringing, weird frequency excitations, or no plot (na) may elude to more serious issues with an algorithm. In many cases, I often move the testing indicator pane to overlay the chirped sine wave pane for a more direct and precise inspection on 4K. I hope that gives you a better idea of this developer tool's intention and it's potentially limited but profound usage. I will be employing this upon nearly indicator fit for evaluation that I can utilize, upgrade, or invent in the future...
Kommentarer
veryfid
I just wrote an article on chart mechanics and @midtownsk8rguy keeps popping up. Thanks for sharing your work! and if you see this comment check out the article im sure you know whats going on.
veryfid
@veryfid, @midtownsk8rguy here is the link
slowcoconut
Hi @ImmortalFreedom -- I've recently built an indicator based on the calculus of curves -- in this case, price -- that could benefit from this sine wave generator. It's an idea inspired by the work of some physicists using logistic periodic functions to determine stock market crashes and earthquakes (they argue and prove that you can't really claim human creations like stock markets or kevlar are all that different from other natural phenomenon). If you have a minute could we please correspond via direct messages, I'd like to share my script with you and dig deeper into this method of market analysis...thanks.
obriff
Nice to test cycle length finding algos ....................
If they exist !!!!!!!!!!!!!!!
Pratik_4Clover
Interesting
Mer