Sinusoidal High Pass Filter (SHPF)Sinusoidal High Pass Filter
This script implements a sinusoidal high pass filter, which is a type of digital filter that is used to remove low frequency components from a signal. The filter is defined by a series of weights that are applied to the input data, with the weights being determined by a sinusoidal function. The resulting filtered signal is then plotted on a chart, allowing the user to visualize the effect of the filter on the original signal.
The script begins by defining the sinusoidal_hpf function, which takes three arguments: _series, _period, and _phase_shift. The _series argument is the input data series that will be filtered, and the _period argument determines the length of the filter. The _phase_shift argument is an optional parameter that allows the user to adjust the phase of the sinusoidal function that is used to calculate the filter weights.
The function then initializes a variable ma to 0.0, and loops through each data point in the input series, starting from the most recent and going back in time for the specified _period number of points. For each data point, the function calculates a weight using a sinusoidal function, and adds the weighted data point to the ma variable. Finally, the function returns the average of the weighted data points by dividing ma by the _period.
The script also includes user input fields for the Length and Phase Shift parameters, which allows the user to customize the filter according to their specific needs. The filtered signal is then plotted on a chart, along with a reference line at 0.
Overall, this script provides a useful tool for analyzing and processing financial data, and can be easily customized to fit the needs of the user.
Sine
Clutter-Filtered, D-Lag Reducer, Spec. Ops FIR Filter [Loxx]Clutter-Filtered, D-Lag Reducer, Spec. Ops FIR Filter is a FIR filter moving average with extreme lag reduction and noise elimination technology. This is a special instance of a static weight FIR filter designed specifically for Forex trading. This is not only a useful indictor, but also a demonstration of how one would create their own moving average using FIR filtering weights. This moving average has static period and weighting inputs. You can change the lag reduction and the clutter filtering but you can't change the weights or the numbers of bars the weights are applied to in history.
Plot of weighting coefficients used in this indicator
These coefficients were derived from a smoothed cardinal sine weighed SMA on EURUSD in Matlab. You can see the coefficients in the code.
What is Normalized Cardinal Sine?
The sinc function sinc (x), also called the "sampling function," is a function that arises frequently in signal processing and the theory of Fourier transforms.
In mathematics, the historical unnormalized sinc function is defined for x ≠ 0 by
sinc x = sinx / x
In digital signal processing and information theory, the normalized sinc function is commonly defined for x ≠ 0 by
sinc x = sin(pi * x) / (pi * x)
What is a Generic or Direct Form FIR Filter?
In signal processing, a finite impulse response (FIR) filter is a filter whose impulse response (or response to any finite length input) is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have internal feedback and may continue to respond indefinitely (usually decaying).
The impulse response (that is, the output in response to a Kronecker delta input) of an Nth-order discrete-time FIR filter lasts exactly {\displaystyle N+1}N+1 samples (from first nonzero element through last nonzero element) before it then settles to zero.
FIR filters can be discrete-time or continuous-time, and digital or analog.
A FIR filter is (similar to, or) just a weighted moving average filter, where (unlike a typical equally weighted moving average filter) the weights of each delay tap are not constrained to be identical or even of the same sign. By changing various values in the array of weights (the impulse response, or time shifted and sampled version of the same), the frequency response of a FIR filter can be completely changed.
An FIR filter simply CONVOLVES the input time series (price data) with its IMPULSE RESPONSE. The impulse response is just a set of weights (or "coefficients") that multiply each data point. Then you just add up all the products and divide by the sum of the weights and that is it; e.g., for a 10-bar SMA you just add up 10 bars of price data (each multiplied by 1) and divide by 10. For a weighted-MA you add up the product of the price data with triangular-number weights and divide by the total weight.
Ultra Low Lag Moving Average's weights are designed to have MAXIMUM possible smoothing and MINIMUM possible lag compatible with as-flat-as-possible phase response.
What is a Clutter Filter?
For our purposes here, this is a filter that compares the slope of the trading filter output to a threshold to determine whether to shift trends. If the slope is up but the slope doesn't exceed the threshold, then the color is gray and this indicates a chop zone. If the slope is down but the slope doesn't exceed the threshold, then the color is gray and this indicates a chop zone. Alternatively if either up or down slope exceeds the threshold then the trend turns green for up and red for down. Fro demonstration purposes, an EMA is used as the moving average. This acts to reduce the noise in the signal.
What is a Dual Element Lag Reducer?
Modifies an array of coefficients to reduce lag by the Lag Reduction Factor uses a generic version of a Kalman velocity component to accomplish this lag reduction is achieved by applying the following to the array:
2 * coeff - coeff
The response time vs noise battle still holds true, high lag reduction means more noise is present in your data! Please note that the beginning coefficients which the modifying matrix cannot be applied to (coef whose indecies are < LagReductionFactor) are simply multiplied by two for additional smoothing .
Things to note
Due to the computational demands of this indicator, there is a bars back input modifier that controls how many bars back the indicator is calculated on. Because of this, the first few bars of the indicator will sometimes appear crazy, just ignore this as it doesn't effect the calculation.
Related Indicators
STD-Filtered, Ultra Low Lag Moving Average
Included
Bar coloring
Loxx's Expanded Source Types
Signals
Alerts
STD-Filtered, Ultra Low Lag Moving Average [Loxx]STD-Filtered, Ultra Low Lag Moving Average is a FIR filter that smooths price using a low-pass filtering with weights derived from a normalized cardinal since function. This indicator attempts to reduce lag to an extreme degree. Try this on various time frames with various Type inputs, 0 is the default, so see where the sweet spot is for your trading style.
What is a Finite Impulse Response Filter?
In signal processing, a finite impulse response (FIR) filter is a filter whose impulse response (or response to any finite length input) is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have internal feedback and may continue to respond indefinitely (usually decaying).
The impulse response (that is, the output in response to a Kronecker delta input) of an Nth-order discrete-time FIR filter lasts exactly {\displaystyle N+1}N+1 samples (from first nonzero element through last nonzero element) before it then settles to zero.
FIR filters can be discrete-time or continuous-time, and digital or analog.
A FIR filter is (similar to, or) just a weighted moving average filter, where (unlike a typical equally weighted moving average filter) the weights of each delay tap are not constrained to be identical or even of the same sign. By changing various values in the array of weights (the impulse response, or time shifted and sampled version of the same), the frequency response of a FIR filter can be completely changed.
An FIR filter simply CONVOLVES the input time series (price data) with its IMPULSE RESPONSE. The impulse response is just a set of weights (or "coefficients") that multiply each data point. Then you just add up all the products and divide by the sum of the weights and that is it; e.g., for a 10-bar SMA you just add up 10 bars of price data (each multiplied by 1) and divide by 10. For a weighted-MA you add up the product of the price data with triangular-number weights and divide by the total weight.
Ultra Low Lag Moving Average's weights are designed to have MAXIMUM possible smoothing and MINIMUM possible lag compatible with as-flat-as-possible phase response.
What is Normalized Cardinal Sine?
The sinc function sinc(x), also called the "sampling function," is a function that arises frequently in signal processing and the theory of Fourier transforms.
In mathematics, the historical unnormalized sinc function is defined for x ≠ 0 by
sinc x = sinx / x
In digital signal processing and information theory, the normalized sinc function is commonly defined for x ≠ 0 by
sinc x = sin(pi * x) / (pi * x)
How this works, (easy mode)
1. Use a HA or HAB source type
2. The lower the Type value the smoother the moving average
3. Standard deviation stepping is added to further reduce noise
Included
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Normalized, Variety, Fast Fourier Transform Explorer [Loxx]Normalized, Variety, Fast Fourier Transform Explorer demonstrates Real, Cosine, and Sine Fast Fourier Transform algorithms. This indicator can be used as a rule of thumb but shouldn't be used in trading.
What is the Discrete Fourier Transform?
In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex-valued function of frequency. The interval at which the DTFT is sampled is the reciprocal of the duration of the input sequence. An inverse DFT is a Fourier series, using the DTFT samples as coefficients of complex sinusoids at the corresponding DTFT frequencies. It has the same sample-values as the original input sequence. The DFT is therefore said to be a frequency domain representation of the original input sequence. If the original sequence spans all the non-zero values of a function, its DTFT is continuous (and periodic), and the DFT provides discrete samples of one cycle. If the original sequence is one cycle of a periodic function, the DFT provides all the non-zero values of one DTFT cycle.
What is the Complex Fast Fourier Transform?
The complex Fast Fourier Transform algorithm transforms N real or complex numbers into another N complex numbers. The complex FFT transforms a real or complex signal x in the time domain into a complex two-sided spectrum X in the frequency domain. You must remember that zero frequency corresponds to n = 0, positive frequencies 0 < f < f_c correspond to values 1 ≤ n ≤ N/2 −1, while negative frequencies −fc < f < 0 correspond to N/2 +1 ≤ n ≤ N −1. The value n = N/2 corresponds to both f = f_c and f = −f_c. f_c is the critical or Nyquist frequency with f_c = 1/(2*T) or half the sampling frequency. The first harmonic X corresponds to the frequency 1/(N*T).
The complex FFT requires the list of values (resolution, or N) to be a power 2. If the input size if not a power of 2, then the input data will be padded with zeros to fit the size of the closest power of 2 upward.
What is Real-Fast Fourier Transform?
Has conditions similar to the complex Fast Fourier Transform value, except that the input data must be purely real. If the time series data has the basic type complex64, only the real parts of the complex numbers are used for the calculation. The imaginary parts are silently discarded.
What is the Real-Fast Fourier Transform?
In many applications, the input data for the DFT are purely real, in which case the outputs satisfy the symmetry
X(N-k)=X(k)
and efficient FFT algorithms have been designed for this situation (see e.g. Sorensen, 1987). One approach consists of taking an ordinary algorithm (e.g. Cooley–Tukey) and removing the redundant parts of the computation, saving roughly a factor of two in time and memory. Alternatively, it is possible to express an even-length real-input DFT as a complex DFT of half the length (whose real and imaginary parts are the even/odd elements of the original real data), followed by O(N) post-processing operations.
It was once believed that real-input DFTs could be more efficiently computed by means of the discrete Hartley transform (DHT), but it was subsequently argued that a specialized real-input DFT algorithm (FFT) can typically be found that requires fewer operations than the corresponding DHT algorithm (FHT) for the same number of inputs. Bruun's algorithm (above) is another method that was initially proposed to take advantage of real inputs, but it has not proved popular.
There are further FFT specializations for the cases of real data that have even/odd symmetry, in which case one can gain another factor of roughly two in time and memory and the DFT becomes the discrete cosine/sine transform(s) (DCT/DST). Instead of directly modifying an FFT algorithm for these cases, DCTs/DSTs can also be computed via FFTs of real data combined with O(N) pre- and post-processing.
What is the Discrete Cosine Transform?
A discrete cosine transform ( DCT ) expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies. The DCT , first proposed by Nasir Ahmed in 1972, is a widely used transformation technique in signal processing and data compression. It is used in most digital media, including digital images (such as JPEG and HEIF, where small high-frequency components can be discarded), digital video (such as MPEG and H.26x), digital audio (such as Dolby Digital, MP3 and AAC ), digital television (such as SDTV, HDTV and VOD ), digital radio (such as AAC+ and DAB+), and speech coding (such as AAC-LD, Siren and Opus). DCTs are also important to numerous other applications in science and engineering, such as digital signal processing, telecommunication devices, reducing network bandwidth usage, and spectral methods for the numerical solution of partial differential equations.
The use of cosine rather than sine functions is critical for compression, since it turns out (as described below) that fewer cosine functions are needed to approximate a typical signal, whereas for differential equations the cosines express a particular choice of boundary conditions. In particular, a DCT is a Fourier-related transform similar to the discrete Fourier transform (DFT), but using only real numbers. The DCTs are generally related to Fourier Series coefficients of a periodically and symmetrically extended sequence whereas DFTs are related to Fourier Series coefficients of only periodically extended sequences. DCTs are equivalent to DFTs of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), whereas in some variants the input and/or output data are shifted by half a sample. There are eight standard DCT variants, of which four are common.
The most common variant of discrete cosine transform is the type-II DCT , which is often called simply "the DCT". This was the original DCT as first proposed by Ahmed. Its inverse, the type-III DCT , is correspondingly often called simply "the inverse DCT" or "the IDCT". Two related transforms are the discrete sine transform ( DST ), which is equivalent to a DFT of real and odd functions, and the modified discrete cosine transform (MDCT), which is based on a DCT of overlapping data. Multidimensional DCTs ( MD DCTs) are developed to extend the concept of DCT to MD signals. There are several algorithms to compute MD DCT . A variety of fast algorithms have been developed to reduce the computational complexity of implementing DCT . One of these is the integer DCT (IntDCT), an integer approximation of the standard DCT ,: ix, xiii, 1, 141–304 used in several ISO /IEC and ITU-T international standards.
What is the Discrete Sine Transform?
In mathematics, the discrete sine transform (DST) is a Fourier-related transform similar to the discrete Fourier transform (DFT), but using a purely real matrix. It is equivalent to the imaginary parts of a DFT of roughly twice the length, operating on real data with odd symmetry (since the Fourier transform of a real and odd function is imaginary and odd), where in some variants the input and/or output data are shifted by half a sample.
A family of transforms composed of sine and sine hyperbolic functions exists. These transforms are made based on the natural vibration of thin square plates with different boundary conditions.
The DST is related to the discrete cosine transform (DCT), which is equivalent to a DFT of real and even functions. See the DCT article for a general discussion of how the boundary conditions relate the various DCT and DST types. Generally, the DST is derived from the DCT by replacing the Neumann condition at x=0 with a Dirichlet condition. Both the DCT and the DST were described by Nasir Ahmed T. Natarajan and K.R. Rao in 1974. The type-I DST (DST-I) was later described by Anil K. Jain in 1976, and the type-II DST (DST-II) was then described by H.B. Kekra and J.K. Solanka in 1978.
Notable settings
windowper = period for calculation, restricted to powers of 2: "16", "32", "64", "128", "256", "512", "1024", "2048", this reason for this is FFT is an algorithm that computes DFT (Discrete Fourier Transform) in a fast way, generally in 𝑂(𝑁⋅log2(𝑁)) instead of 𝑂(𝑁2). To achieve this the input matrix has to be a power of 2 but many FFT algorithm can handle any size of input since the matrix can be zero-padded. For our purposes here, we stick to powers of 2 to keep this fast and neat. read more about this here: Cooley–Tukey FFT algorithm
SS = smoothing count, this smoothing happens after the first FCT regular pass. this zeros out frequencies from the previously calculated values above SS count. the lower this number, the smoother the output, it works opposite from other smoothing periods
Fmin1 = zeroes out frequencies not passing this test for min value
Fmax1 = zeroes out frequencies not passing this test for max value
barsback = moves the window backward
Inverse = whether or not you wish to invert the FFT after first pass calculation
Related indicators
Real-Fast Fourier Transform of Price Oscillator
STD-Stepped Fast Cosine Transform Moving Average
Real-Fast Fourier Transform of Price w/ Linear Regression
Variety RSI of Fast Discrete Cosine Transform
Additional reading
A Fast Computational Algorithm for the Discrete Cosine Transform by Chen et al.
Practical Fast 1-D DCT Algorithms With 11 Multiplications by Loeffler et al.
Cooley–Tukey FFT algorithm
Ahmed, Nasir (January 1991). "How I Came Up With the Discrete Cosine Transform". Digital Signal Processing. 1 (1): 4–5. doi:10.1016/1051-2004(91)90086-Z.
DCT-History - How I Came Up With The Discrete Cosine Transform
Comparative Analysis for Discrete Sine Transform as a suitable method for noise estimation
Chirped Sine Wave GeneratorINTRODUCTION:
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...
Flunki Multi Sine Wave EXPERIMENTS #1a** EXPERIMENTAL **
Herewith further sine wave experiments..
So you have 3 sine waves modulated by pivot points with look back / forward ranges
You can globally modulate the amplitude by the period, more fun than it sounds
You can flip phase individually
You can adjust offset individually
There is a global offset and a global period multiplier
See what you want to see !
Enjoy
ps. published this at xmas but it got kicked back by the mods for reasons
Flunki Multi Sine WaveDec 1
Herewith 6 sinewaves, including amplitude, phase, wavelength in bars, colour and fill options.
May develop to include a bunch wavelength value presets, and other waveforms, and modulation options.
Enjoy the harmonics !
Release Notes: Cosmetic minor fix for fill colour
Added centre line
Release Notes: Added global fill transparency input option
Release Notes: Added a Global option to use the period value as the amplitude value too, more fun than it sounds...
Release Notes: Last update for now
Added input source level as sine waveform period, as a plot too.
Release Notes: Set the CLOSE plot to be able to accept other source inputs (even itself :)
Release Notes: Added a global bar period multiplier, and some other bits to the price modulated sine, invert and a separate amplitude multiplier
Added individual flip phase per oscillator, tweaked some defaults
** Had to republish due to TV rule miscellany **
[blackcat] L2 Ehlers Sine Wave Coupled Eight Planetary CycleLevel: 2
Background
Have you considered that factors outside the Earth will be related to macro market trends? Let’s discuss the relationship between the planetary movement in the Galaxy and the market movement on Earth today! Although I said that, you may have laughed out in front of the screen, but the calculations in this script are entirely based on astronomical data and mathematical relationships.
Your next question may be why you compare the movements of the eight planets and the laws of the market on the earth together? My answer comes from a Cybernetic Sine Wave indicator proposed by Dr. John F. Ehlers.
Function
L2 Ehlers Sine Wave Coupled Eight Planetary Cycle first converts the astronomical data of the eight major planets into planetary aspects/phases through mathematical relationships. Planetary aspects/phases can provide the historical and current relative positions of each planet in the mathematical triangle relationship. We can use a simple mathematical sine formula to constrain the planet's trajectory between -1 and 1, which is what we often call a sine wave.
The relationship between the sine wave and the market can be extracted from the theory of John F. Ehlers. In Ehlers' theory, market price can be modeled by the trend and cycle modes. And in his works, there are many indicators of how to completely remove the trend in the market price and only leave the cycle mode data. The Cybernetic Sine Wave indicator is exactly the cycle mode data after the market trend is stripped, and expressed in the form of a sine wave.
If you can read to here with patience, you must also be aware of the premise that the trajectories of the eight planets and the laws of the earth market can be coupled: the trajectory of the sine wave mode. Therefore, this indicator is a tool for comparing and analyzing the two in the same chart. I hope you like it.
Finally, in order to benchmark the trajectories of the eight planets and the specific market on the earth, a starting point in time is particularly important. This is the base date of the market index to be analyzed. It is the year, month, and day data specified by the index, which needs to be input by the user when analyzing a specific stock index. For example, the base date of the S&P 500 index is January 3, 1928. This date needs to be entered into the indicator to analyze the SPX500.
Key Signal
Mercury_trail ---> smoothed Mercury orbit sine wave
Venus_trail ---> smoothed Venus orbit sine wave
Earth_trail ---> smoothed Earth orbit sine wave
Earth_mirror ---> smoothed Earth mirrored orbit sine wave
Mars_trail ---> smoothed Mars orbit sine wave
Jupiter_trail ---> smoothed Jupiter orbit sine wave
Saturn_trail ---> smoothed Saturn orbit sine wave
Uranus_trail ---> smoothed Uranus orbit sine wave
Neptune_trail ---> smoothed Neptune orbit sine wave
Aspect 0, 45, 90, 225, 270 deg ---> key planet aspects
ehlersine ---> Ehlers Cybernetic Sine Wave
ehlerslsine ---> Ehlers Cybernetic Lead Sine Wave
Pros and Cons
This is a technical indicator that I have come up with on a whim, and the laws of planetary operation and the operation of the Earth market are still being explored. Hope that interested friends will share your new discoveries.
Remarks
To celebrate I released the 50th technical indicator script on TV!
Courtesy of @sal157011 John Ehlers "Cybernetic Sine Wave" indicator, I converted it from pine v2 to pine v4 in this script.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
MTF Even Better Sine Wave - Dr. John EhlersThis is my enhanced "MTF Even Better Sine Wave" indicator using Pine Script version 4.0. This originates from the book "Cycle Analytics for Traders" written by Dr. John Ehlers in Chapter 12. While the original was simplistically designed, I enhanced it by adding a multitude of features Pine Script now accommodates.
Most noticeably is the multiple time frame (MTF) features in the indicator "Settings". The three displayed indicators are using 5 second, 30 second, and 7 minute time frames. This may be the first PSv4.0 script to accommodate seconds in MTF adequately, but don't quote me on that. I haven't spent hours extensively looking for them. Be forewarned, second-based time frames are currently for Premium subscribers only, until such time in the future when the prerogative of TV might change. I will be adding second-based time frames to my other indicators where I feel it is beneficial to the indicator.
Unlike Dr. John Ehlers' other Sinewave indicator that is intended for identifying turning points in cycling price fluctuations, the "Even Better Sine Wave", having stochastic like qualities, is intended for trending assets.
Features List Includes:
I.P.O.C.S.(Initial Public Offering Clean Start) Technology
Enable/disable dark background for enhanced visibility
"Source" selection with multiple time frame adjustments - including seconds
"Duration" adjustment
"Super Smoother BandEdge" adjustment
"Display Area" selection for visual mutations displayed above
Ranges and thresholds are enable/disable capable
Upper threshold adjustment
Lower threshold adjustment
Adjustable centered medial zone
Normalized zero mean to +/-1
This is not a freely available indicator, FYI. To witness my Pine poetry in action, properly negotiated requests for unlimited access, per indicator, may ONLY be obtained by direct contact with me using TV's "Private Chats" or by "Message" hidden in my member name above. The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. If you do have any questions or comments regarding this indicator, I will consider your inquiries, thoughts, and concepts presented below in the comments section, when time provides it. When my indicators achieve more prevalent use by TV members, I will implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
DH: Rise And Drop ForecasterTHE RISE AND DROP FORECASTER
Imaging knowing what direction the market is heading hours in advance. Imagine getting a signal to take a long or short position literally as price action trends in your direction. Imagine being right 70% or 80% of the time (maybe more). Imaging pocketing gains from 1% to 3% to 5% or more with the confidence of a champion trader!...
...THIS is the potential of The RISE AND DROP FORECASTER. This is a powerful tool in any traders arsenal. It has been optimized for forecasting on a 1 HOUR to 4 HOUR chart, but with minor adjustments, it will work on other timeframes as well.
Using a process of divergency monitoring across multiple standard oscillators and indicators such as MOMENTUM, CCI, STOCHASTICS, RSI, MACD, and the Chaikin Money Flow, this indicator has the uncanny ability to foretell market movement with a high level of accuracy.
Is it perfect? No. Is it better than other indicators? Well... it is like having a bunch of the best indicators together, collectively giving you one combined opinion... candle by candle as you go along.
FORECASTING
If a rise in prices is coming, this indicator will tell you (typically hours in advance). If a price drop is just around the corner, the RISE AND DROP FORECASTER will do just as its name implies, it will forecast in advance a market move to the downside.
Some signals will be strong and decisive, but the RISE AND DROP FORECASTER will also inform you of weaker signals so you can evaluate all your opportunities.
Included at the bottom of this indicator is a series of Weighted Sine Wave "Dots" (red and green) that allow you to double check all signals before committing to any trade.
COLOR CODED SIGNALS
Forecasts and Signals are presented as DOTS, ARROWS and BACKGROUND.
The color code are:
GRAY = represents a neutral zone (EXCEPT for the first gray after any other color, which is often a trigger signal or point of interest.)
RED = indicates a maximum peek in prices with a decline forthcoming (you can prepare to short -OR- sell any longs you are holding).
ORANGE = depicts a moderate to strong price zone (often proceeds RED in uptrend and follows RED in as prices weaken).
GREEN = shows you when there is a moderate uptrend forthcoming or in progress. (often proceeds LIME in a downtrend and follows LIME as prices begin to reverse).
LIME = means you are near a BUY (go long) zone but should wait for a price reversal signal to the upside (the first gray after green is a LONG trigger to consider).
ALERTS
The RISE AND DROP FORECASTER comes with built-in ALERTS for Tradingview.
You can set a Tradingview alert to signal you each time you enter a forecast zone (rise coming or drop coming). Any time frame is ok, but we recommend 1 HOUR CANDLES (or greater) for best results.
To set alerts, select the RiseDrop Forecaster in the alert set-up window, then select the type alert you want:
6 ALERT CHOICES:
Drop Soon, Up Soon, Drop Now, Up Now, Long Out, Short Out
Set parameters to GREATER THAN / VALUE = 0 --- that's it.
Every time a "Drop Soon" Zone appears you'll get a notification. Every time an "Up Soon" Zone Begins appears you'll get a notification. And if you set up the "NOW" alerts, you'll also get "Drop Now" and "Up Now" alerts at just the point in time where price action might present a great opportunity.
Finally, there are optional "OUT" alerts that can advise you on exiting a trade you are in: A Long Green Out BLACK Diamond means you should consider exiting any long -and- Short Red Out BLACK Diamond means you might should exit any open shorts. These BLACK DIAMOND OUT signals must be toggled on from your setting panel to view them on your charts.
INDICATOR OBSERVATIONS ARE HELPFUL
While this indicator attempts to signal interesting price movement opportunities on the chart via signals, you can also study this indicators' output and make some smart calls based on what you see. Paying attention to the COLORS is one thing, but also the DOT patterns as they plot upward and downward. These patterns leave clues that might become tradable actions if you detect recurring patterns in history. Give it a try!
WARNING: Don't trade signals blindly! The signals from this indicator are signals to STOP, LOOK, EVALUATE, and MAKE A DECISION. Sometimes doing nothing or waiting is the best decision.
Before basing any trading action on a signal from the RISE AND DROP FORECASTER, review the history of the asset you are trading (have signals in the past worked out well?), select a timeframe that appears to have the best history of good signals, adjust settings if needed. Double-check everything. Start with smaller capital investments until you are skilled with the use of this indicator.
HOW TO USE THIS INDICATOR:
1) Install and select your asset.
2) Review options in settings.
3) Start with 1 HOUR plus timeframes.
4) Study the results and price action in history.
5) OPTIONAL: Set-up alerts.
6) Start with smaller trades as you learn.
COMBINE WITH OTHER INDICATORS
It is recommended you use this indicator in combination with other indicators, plus your knowledge of trading and market conditions. This will help you refine your trading opportunities and assure greater success.
This RISE AND DROP FORECASTER works well as a stand-alone but it is even better with the GRID RANGE FINDER INDICATOR , the GRID BOX MAPPER , the GRID START INDICATOR , the BULLY BAR , the free HEIKIN ASHI TRUE PRICE DOT INDICATOR or many other indicators.
The RISE AND DROP FORECASTER is ideal for grid traders but any trader will benefit from these price predictions regardless of what type trading you do.
Join our Crypto Grid Masters Community (Discord) for additional help and ideas with my indicators and your grids!
Automate your Grid Strategy using the Grid Bot here:
cryptogridbot.com
THIS IS A PAID INDICATOR
(currently at 50% off annual subscription)
PURCHASE or SUBSCRIBE HERE:
ez.ht
AFTER YOU'VE PURCHASED - ping me here at Tradingview with receipt number (@ DanHollings ) or my Discord
Any indicator you purchase will be added to the "Invite-Only" section of your indicators area at Tradingview as quickly as I can get to it.
PLEASE HIT THE LIKE BUTTON (and follow me... lots of great stuff in the works!)
As always, I appreciate your support. Please share with others.
ENJOY!
Dan Hollings
Master Crypto Grid Trader
Host of the "High Leverage Lounge"
Please Explore My Other Indicators, Scripts, Grids and Educational Ideas.
@ DanHollings on Tradingview
Crypto Grid Bot
cryptogridbot.com
Crypto Grid Master Discord
cryptogridtrader.com
Simple Sine Wave GeneratorThe title pretty much sums up what purpose this tool serves. It is NOT an indicator, just a simple sine wave generator. You may use it to attempt to measure cycle periods occurring in the markets using "Wave Length (Bars)" setting in the "Format" panel. Other features include the sine wave phase is shift-able to the left and the right, and there is also an amplitude adjustment as well.
Periodic ChannelThis indicator try to create a channel by summing a re-scaled and readapted sinusoidal wave form to the price mean.
The length parameter control the speed of the sinusoidal wave form, this parameter is not converted to a sine wave period for allowing a better estimation, higher length's work better but feel free to try shorter periods.
The invert parameter invert the sinusoidal wave.
Each bands represent possible return points, the higher the band the higher the probability.
Inverted sin wave exemple
The performance of the indicator is subjective to the main estimation (blue line), select the parameter that best fit the blue line to the price.
Best ragards
Sine Weighted Moving AverageSine Weighted Moving Average indicator.
The result is very similar to the Triangular Moving Average.
PRO Sinewave - BETAThis is a BETA version. Which means that there might be unstability, errors...
I just decided to create this separate version of the indicator in order to let people test & give reviews before pushing the actual release to the public version.
This versions will be more "advanced" but can be less reliable.. Choose wisely !
THIS SCRIPT ACCESS WILL ONLY BE GRANTED TO SUBSCRIBED USERS... (infos on the public release) So please don't post comments to ask for unlocking !
LINK TO THE PUBLIC RELEASE
Don't forget to hit the like/follow button if you feel like my work deserves it ;)
You can check my other indicators via my TradingView's Profile : @PRO_Indicators
Bests,
Phil