Efficient Trend Step - Spotting Trends EfficientlyIntroduction
The trend-step indicator (or auto-line) was based on volatility and aimed to spot trends in an adaptive way, however the indicator was only based on volatility and didn't gave much attention to the trend, later on i would publish an efficient version of it (efficient auto-line) based on the efficiency ratio who could adapt to the trend and eliminate potential whipsaws trades, however this approach included many settings that would require changes if the user switched markets, which reduce the utility of the indicator and make it actually super inefficient.
This is why i had to propose this indicator who remove all the flaws the efficient auto-line had without removing the core idea of it.
The Indicator
The indicator is based on recursion, when the price is superior/inferior to the indicator precedent value +/- volatility metric, then the indicator is equal to the closing price, this allow the indicator to fit the price relatively well. The volatility metric used is based on 2 standard deviations, one fast and one slow and the efficiency ratio, basically when price is trending the volatility metric will be closer to the value of the fast standard deviations, which would allow the indicator to be closer to the price, else the metric will be closer to the slow standard deviation which restrain the indicator from changing, therefore the volatility metric act as a threshold.
length control the period of the efficiency ratio, lower values of length will result in a volatility metric way closer to the fast standard deviation thus making the indicator more inclined toward making false signals.
Lower values for slow will make the indicator more reactive.
The indicator can be reactive but can also be really conservative, thus even remaining unchanged in some contrary movements of the main trend, this is called robustness and has its pro's and con's.
Conclusion
The trend-step indicators family might get to an end, or not, nonetheless they can provide precise entries and be extremely robust, which is great. Using low settings might prove to be useful to remove some noise. I hope this version find its use amongst the community. Thanks for reading !
Reactive
Turbo Scaler - The Art Of Being (too) EarlyIntroduction
Fast smooth indicators that produce early signals can sound utopic but mathematically its not a huge deal, the effect of early outputs based on smooth inputs can be seen on differentiators crosses, this is why i propose this indicator that aim to return extra fast signals based on a slightly modified max-min normalization method. The indicator introduce inherent smoothing without having an huge impact on the indicator reactivity.
The Indicator
The indicator is based on max-min normalization (like the stochastic oscillator) however instead of using the highest/lowest of the input we use the highest and lowest of the moving average of the input. This process using as input the closing price and the moving average closing price will return two lines, and because of the nature of max-min normalization we can see that the trigger line (in orange) produce earlier crosses. length control the highest/lowest period while smooth control the output lines smoothness (50 by default).
alpha control the scaling amount, with higher values of alpha creating more constrained scale, when alpha = 1 the scale is in a range of (0,1) while lower values of alpha can make the output move more freely.
alpha = 0.25
alpha = 1
Higher values of alpha create earlier signals.
Downsides Of Early Crosses
Of course such indicator make us exposed to the trend as seen below.
We can nonetheless protect ourselves against such cases scenarios by lowering alpha.
lowering alpha allow to catch movements of the trend without loosing much reactivity at the cost of an increased umber of trades.
Possible Uses
The proposed indicator allow for an high number of uses because of its scale, reactive nature...etc. A method that allow us to go with the main trend is by taking into account the crosses between the lines and the sign of the lines, for example :
The first signal (green) happen when the main line (in blue) crossover the trigger (orange) while both are > 0, the same happen with the second signal however both lines are < 0. This method can use certain levels instead of the sign (main line crossover trigger while both > 0.7...etc).
This method is great for the indicator because such cases scenarios does not happen a lot with ranging markets, we can clearly that when trending the trigger can have the tendency to be flat and higher than 0 thus allowing for the main line to produce those signals.
Conclusion
I have presented a super reactive crosses indicator based on max-min normalization with the ability to both be smooth and produce early entries/exits signals, different methods have been presented in order to allow for different setups using this indicator.
The introduction of the alpha parameter allow for more control which is what those kind of indicators needs. I hope you find an use to it :)
Support Me
Making indicators sure is hard, it takes time and it can be quite lonely to, so i would love talking with you guys while making them :) There isn't better support than the one provided by your friends so drop me a message.
Autonomous Recursive Moving AverageIntroduction
People often ask me what is my best indicators, i can't really respond to this question with a straight answer but i would say you to check this indicator. The Autonomous Recursive Moving Average (ARMA) is an adaptive moving average that try to minimize the sum of squares thanks to a ternary operator, this choice can seem surprising since most of the adaptive moving averages adapt to a smoothing variable thanks to exponential averaging, but there are lot of downsides to this method, i really wanted to have a flat filter during flat markets and this is what i achieved.
The Indicator
length control the amount of smoothing during trending periods, gamma is the trend sensitivity threshold, higher values of gamma will make an overall flat filter, adjust gamma to skip ranging markets.
gamma = 2, we can adjust to 3 while preserving smoothing reactivity with trading periods.
gamma = 3
low length and higher gamma create more boxy result, the filter add overshoots directly in the output, its unfortunate.
The Zero-Lag option can reduce the lag as well as getting additional flat results without changing gamma.
Conclusion
The indicator need work, but i can't leave without publishing it, the overshoots are a big problems, changing sma for another stable filter can help. I hope you find an use to it, i really like this indicator.
Thanks for reading
Trigonometric OscillatorIts a pretty old script and i have absolutely no idea how i did it, the code kinda look like the phase wrapping/unwrapping formula. This indicator is an oscillator, sometimes its reactivity is impressive so i think its a good idea to post it, feel free to experiment with it.
QMA/SMA DifferenceIntroduction
The quadratic moving average (QMA) or quadratic weighted moving average (QWMA) is a type of moving average who is closer to the price when price is up trending. This moving average is defined as the square root of the moving average of the squared price. The QMA-SMA difference use this moving average to provide a new volatility indicator who aim to be reactive and filter noisy volatility in order to only provide essential information.
QMA - SMA
This indicator is defined as the difference between a quadratic moving average and a simple moving average of same period. Since the QMA emphasize up movements and tend to be away from down movements she is always greater than the simple moving average, so a simple difference between those moving average provide our volatility indicator. Below is a comparison with a standard deviation and the indicator of both period 100.
Since its a difference between two moving average it can be interesting to use a simple moving as source for the standard deviation to provide another comparison
The standard deviation is smoother but still contain more information as well as having less reactivity.
Conclusion
I have a presented a new volatility indicator based on the quadratic moving average and compared it with a classic standard deviation. It is possible to change the power order of the QMA in order to provide different results, in order to do so you must also change the root, this is done in pine with : pow(sma(pow(close,w),length),1/w) where w is the power order, notice that an high power order can provide non attributed values.
Linear Quadratic Convergence Divergence OscillatorIntroduction
I inspired myself from the MACD to present a different oscillator aiming to show more reactive/predictive information. The MACD originally show the relationship between two moving averages by subtracting one of fast period and another one of slow period. In my indicator i will use a similar concept, i will subtract a quadratic least squares moving average with a linear least squares moving average of same period, since the quadratic least squares moving average is faster than the linear one and both methods have low-lag this will result in a reactive oscillator.
LQCD In Details
A quadratic least squares moving average try to fit a quadratic function (parabola) to the price by using the method of least squares, the linear least squares moving average try to fit a line. Non-linear fit tend to minimize the sum of squares in non-linear data, this is why a quadratic method is more reactive. The difference of both filters give us an oscillator, then we apply a simple moving average to this oscillator to provide the signal line, subtracting the oscillator and its signal line give us the histogram, those two last steps are the same used in the MACD.
Length control the period of the quadratic/linear moving average. While the MACD use a signal line for plotting the histogram i also added the option to plot the momentum of the quadratic moving average instead, the result is smoother and reduce irregularities, in order to do so just check the differential option in the parameter box.
The period of the signal line and the momentum are both controlled by the signal parameter.
A predictive approach can be made by subtracting the histogram with the signal line, this process make the histogram way more predictive, in order to do so just check the predictive histogram option in the parameter box.
Predictive histogram with simple histogram option. The differential mode can also be used with the predictive parameter, this result in a smoother but less reactive prediction.
Information Interpretation
The amount of information the MACD can give us is high. We can use the histogram as signal generator, or the if the oscillator is over/under 0, combine the oscillator/signal line with histogram, combinations can provide various systems. Some traders use the histogram as signal generator and use the cross between the histogram and the signal line as a stop signal, this method can avoid some whipsaw trades. The study of divergences with the price is also another method.
Conclusion
This oscillator aim to show the same amount of information as the MACD with a similar calculation method but using different kind of filters as well as eliminating the need to use two separates periods for the moving averages calculation, its still possible to use different periods for the quadratic/linear moving average but the results can be less accurate. This indicator can be used like the MACD.
Fast Z-ScoreIntroduction
The ability of the least squares moving average to provide a great low lag filter is something i always liked, however the least squares moving average can have other uses, one of them is using it with the z-score to provide a fast smoothing oscillator.
The Indicator
The indicator aim to provide fast and smooth results. length control the smoothness.
The calculation is inspired from my sample correlation coefficient estimation described here
Instead of using the difference between a moving average of period length/2 and a moving average of period length , we use the difference between a lsma of period length/2 and a lsma of period length , this difference is then divided by the standard deviation. All those calculations use the price smoothed by a moving average as source.
The yellow version don't divide the difference by a standard deviation, you can that it is less reactive. Both version have length = 200
Conclusion
I presented a smooth and responsive version of a z-score, the result could be used to estimate an even faster lsma by using the line rescaling technique and our indicator as correlation coefficient.
Hope you like it, feel free to modify it and share your results ! :)
Notes
I have been requested a lot of indicators lately, from mt4 translations to more complex time series analysis methods, this accumulation of work made that it is impossible for me to publish those within a short period of time, also some are really complex. I apologize in advance for the inconvenience, i will try to do my best !
Edge-Preserving FilterIntroduction
Edge-preserving smoothing is often used in image processing in order to preserve edge information while filtering the remaining signal. I introduce two concepts in this indicator, edge preservation and an adaptive cumulative average allowing for fast edge-signal transition with period increase over time. This filter have nothing to do with classic filters for image processing, those filters use kernels convolution and are most of the time in a spatial domain.
Edge Detection Method
We want to minimize smoothing when an edge is detected, so our first goal is to detect an edge. An edge will be considered as being a peak or a valley, if you recall there is one of my indicator who aim to detect peaks and valley (reference at the bottom of the post) , since this estimation return binary outputs we will use it to tell our filter when to stop filtering.
Filtering Increase By Using Multi Steps Cumulative Average
The edge detection is a binary output, using a exponential smoothing could be possible and certainly more efficient but i wanted instead to try using a cumulative average approach because it smooth more and is a bit more original to use an adaptive architecture using something else than exponential averaging. A cumulative average is defined as the sum of the price and the previous value of the cumulative average and then this result is divided by n with n = number of data points. You could say that a cumulative average is a moving average with a linear increasing period.
So lets call CMA our cumulative average and n our divisor. When an edge is detected CMA = close price and n = 1 , else n is equal to previous n+1 and the CMA act as a normal cumulative average by summing its previous values with the price and dividing the sum by n until a new edge is detected, so there is a "no filtering state" and a "filtering state" with linear period increase transition, this is why its multi-steps.
The Filter
The filter have two parameters, a length parameter and a smooth parameter, length refer to the edge detection sensitivity, small values will detect short terms edges while higher values will detect more long terms edges. Smooth is directly related to the edge detection method, high values of smooth can avoid the detection of some edges.
smooth = 200
smooth = 50
smooth = 3
Conclusion
Preserving the price edges can be useful when it come to allow for reactivity during important price points, such filter can help with moving average crossover methods or can be used as a source for other indicators making those directly dependent of the edge detection.
Rsi with a period of 200 and our filter as source, will cross triggers line when an edge is detected
Feel free to share suggestions ! Thanks for reading !
References
Peak/Valley estimator used for the detection of edges in price.
Recursive StochasticThe Self Referencing Stochastic Oscillator
The stochastic oscillator bring values in range of (0,100). This process is called Feature scaling or Unity-Based Normalization
When a function use recursion you can highlights cycles or create smoother results depending on various factors, this is the goal of a recursive stochastic.
For example : k = s(alpha*st+(1-alpha)*nz(k )) where st is the target source.
Using inputs with different scale level can modify the result of the indicator depending on which instrument it is applied, therefore the input must be normalized, here the price is first passed through a stochastic, then this result is used for the recursion.
In order to control the level of the recursion, weights are distributed using the alpha parameter. This parameter is in a range of (0,1), if alpha = 1, then the indicator act as a normal stochastic oscillator, if alpha = 0, then the indicator return na since the initial value for k = 0. The smaller the alpha parameter, the lower the correlation between the price and the indicator, but the indicator will look more periodic.
Comparison
Recursive Stochastic oscillator with alpha = 0.1 and bellow a classic oscillator (alpha = 1)
The use of recursion can both smooth the result and make it more reactive as well.
Filter As Source
It is possible to stabilize the indicator and make it less affected by outliers using a filter as input.
Lower alpha can be used in order to recover some reactivity, this will also lead to more periodic results (which are not inevitably correlated with price)
Hope you enjoy
For any questions/demands feel free to pm me, i would be happy to help you