STD-Filtered Jurik Volty Adaptive TEMA [Loxx]The STD-Filtered Jurik Volty Adaptive TEMA is an advanced moving average overlay indicator that incorporates adaptive period inputs from Jurik Volty into a Triple Exponential Moving Average (TEMA). The resulting value is further refined using a standard deviation filter to minimize noise. This adaptation aims to develop a faster TEMA that leads the standard, non-adaptive TEMA. However, during periods of low volatility, the output may be noisy, so a standard deviation filter is employed to decrease choppiness, yielding a highly responsive TEMA without the noise typically caused by low market volatility.
█ What is Jurik Volty?
Jurik Volty calculates the price volatility and relative price volatility factor.
The Jurik smoothing includes 3 stages:
1st stage - Preliminary smoothing by adaptive EMA
2nd stage - One more preliminary smoothing by Kalman filter
3rd stage - Final smoothing by unique Jurik adaptive filter
Here's a breakdown of the code:
1. volty(float src, int len) => defines a function called volty that takes two arguments: src, which represents the source price data (like close price), and len, which represents the length or period for calculating the indicator.
2. int avgLen = 65 sets the length for the Simple Moving Average (SMA) to 65.
3. Various variables are initialized like volty, voltya, bsmax, bsmin, and vsum.
4. len1 is calculated as math.max(math.log(math.sqrt(0.5 * (len-1))) / math.log(2.0) + 2.0, 0); this expression involves some mathematical transformations based on the len input. The purpose is to create a dynamic factor that will be used later in the calculations.
5. pow1 is calculated as math.max(len1 - 2.0, 0.5); this variable is another dynamic factor used in further calculations.
6. del1 and del2 represent the differences between the current src value and the previous values of bsmax and bsmin, respectively.
7. volty is assigned a value based on a conditional expression, which checks whether the absolute value of del1 is greater than the absolute value of del2. This step is essential for determining the direction and magnitude of the price change.
8. vsum is updated based on the previous value and the difference between the current and previous volty values.
9. The Simple Moving Average (SMA) of vsum is calculated with the length avgLen and assigned to avg.
10. Variables dVolty, pow2, len2, and Kv are calculated using various mathematical transformations based on previously calculated variables. These variables are used to adjust the Jurik Volty indicator based on the observed volatility.
11. The bsmax and bsmin variables are updated based on the calculated Kv value and the direction of the price change.
12. inally, the temp variable is calculated as the ratio of avolty to vsum. This value represents the Jurik Volty indicator's output and can be used to analyze the market trends and potential reversals.
Jurik Volty can be used to identify periods of high or low volatility and to spot potential trade setups based on price behavior near the volatility bands.
█ What is the Triple Exponential Moving Average?
The Triple Exponential Moving Average (TEMA) is a technical indicator used by traders and investors to identify trends and price reversals in financial markets. It is a more advanced and responsive version of the Exponential Moving Average (EMA). TEMA was developed by Patrick Mulloy and introduced in the January 1994 issue of Technical Analysis of Stocks & Commodities magazine. The aim of TEMA is to minimize the lag associated with single and double exponential moving averages while also filtering out market noise, thus providing a smoother, more accurate representation of the market trend.
To understand TEMA, let's first briefly review the EMA.
Exponential Moving Average (EMA):
EMA is a weighted moving average that gives more importance to recent price data. The formula for EMA is:
EMA_t = (Price_t * α) + (EMA_(t-1) * (1 - α))
Where:
EMA_t: EMA at time t
Price_t: Price at time t
α: Smoothing factor (α = 2 / (N + 1))
N: Length of the moving average period
EMA_(t-1): EMA at time t-1
Triple Exponential Moving Average (TEMA):
Triple Exponential Moving Average (TEMA):
TEMA combines three exponential moving averages to provide a more accurate and responsive trend indicator. The formula for TEMA is:
TEMA = 3 * EMA_1 - 3 * EMA_2 + EMA_3
Where:
EMA_1: The first EMA of the price data
EMA_2: The EMA of EMA_1
EMA_3: The EMA of EMA_2
Here are the steps to calculate TEMA:
1. Choose the length of the moving average period (N).
2. Calculate the smoothing factor α (α = 2 / (N + 1)).
3. Calculate the first EMA (EMA_1) using the price data and the smoothing factor α.
4. Calculate the second EMA (EMA_2) using the values of EMA_1 and the same smoothing factor α.
5. Calculate the third EMA (EMA_3) using the values of EMA_2 and the same smoothing factor α.
5. Finally, compute the TEMA using the formula: TEMA = 3 * EMA_1 - 3 * EMA_2 + EMA_3
The Triple Exponential Moving Average, with its combination of three EMAs, helps to reduce the lag and filter out market noise more effectively than a single or double EMA. It is particularly useful for short-term traders who require a responsive indicator to capture rapid price changes. Keep in mind, however, that TEMA is still a lagging indicator, and as with any technical analysis tool, it should be used in conjunction with other indicators and analysis methods to make well-informed trading decisions.
Extras
Signals
Alerts
Bar coloring
Loxx's Expanded Source Types (see below):
Stepped
STD-Stepped, Variety N-Tuple Moving Averages [Loxx]STD-Stepped, Variety N-Tuple Moving Averages is the standard deviation stepped/filtered indicator of the following indicator
Variety N-Tuple Moving Averages is a moving average indicator that allows you to create 1- 30 tuple moving average types; i.e., Double-MA, Triple-MA, Quadruple-MA, Quintuple-MA, ... N-tuple-MA. This version contains 5 different moving average types including T3. A list of tuples can be found here if you'd like to name the order of the moving average by depth: Tuples extrapolated
STD-Stepped, You'll notice that this is a lot of code and could normally be packed into a single loop in order to extract the N-tuple MA, however due to Pine Script limitations and processing paradigm this is not possible ... yet.
If you choose the EMA option and select a depth of 2, this is the classic DEMA ; EMA with a depth of 3 is the classic TEMA , and so on and so forth this is to help you understand how this indicator works. This version of NTMA is restricted to a maximum depth of 30 or less. Normally this indicator would include 50 depths but I've cut this down to 30 to reduce indicator load time. In the future, I'll create an updated NTMA that allows for more depth levels.
This is considered one of the top ten indicators in forex. You can read more about it here: forex-station.com
How this works
Step 1: Run factorial calculation on the depth value,
Step 2: Calculate weights of nested moving averages
factorial(nemadepth) / (factorial(nemadepth - k) * factorial(k); where nemadepth is the depth and k is the weight position
Examples of coefficient outputs:
6 Depth: 6 15 20 15 6
7 Depth: 7 21 35 35 21 7
8 Depth: 8 28 56 70 56 28 8
9 Depth: 9 36 34 84 126 126 84 36 9
10 Depth: 10 45 120 210 252 210 120 45 10
11 Depth: 11 55 165 330 462 462 330 165 55 11
12 Depth: 12 66 220 495 792 924 792 495 220 66 12
13 Depth: 13 78 286 715 1287 1716 1716 1287 715 286 78 13
Step 3: Apply coefficient to each moving average
For QEMA, which is 5 depth EMA , the caculation is as follows
ema1 = ta. ema ( src , length)
ema2 = ta. ema (ema1, length)
ema3 = ta. ema (ema2, length)
ema4 = ta. ema (ema3, length)
ema5 = ta. ema (ema4, length)
qema = 5 * ema1 - 10 * ema2 + 10 * ema3 - 5 * ema4 + ema5
Included:
Alerts
Loxx's Expanded Source Types
Bar coloring
Signals
Standard deviation stepping
STD-Filtered Variety RSI of Double Averages w/ DSL [Loxx]STD-Filtered Variety RSI of Double Averages w/ DSL is a standard deviation step filtered RSI indicator that is calculated using double smoothing. The user can choose from 8 different RSI types and 38 different double smoothing types. This indicator uses Discontinued Signal Lines instead of regular signals and levels. This allows the signals to be more precise in catching early trend breakouts and breakdowns.
Things to note
Double smoothing of the source does not function like DEMA, for example. This double smoothing is just smoothing of smoothing of source
There are two types of smoothing for Discontinued Signals Lines: Regular EMA and Fast EMA
T3 RSI has been added on top of Loxx's Variety RSI library
Contained inside this indicator
Loxx's Moving Averages
Loxx's Variety RSI
Related indicators
Corrected RSI w/ Floating Levels
Adaptive, Jurik-Filtered, Floating RSI
Variety RSI w/ Dynamic Zones
Included
Bar coloring
Alerts
2 types of signals with precision adjustment
Loxx's Variety RSI
Loxx's Moving Averages
PA-Adaptive, Stepped-MA of Composite RSI [Loxx]PA-Adaptive, Stepped-MA of Composite RSI is an RSI indicator using a different kind of RSI called Composite RSI. This indicator is Phase Accumulation Cycle Adaptive and uses a stepped moving average.
What is Composite RSI?
The name of the composite RSI might mislead a bit.
Composite RSI is not "compositing" RSIs but is a rather new way of calculating the RSI. Unlike the RSI that is a sort of a momentum indicators, composite RSI is more a trending indicator. It tends to filter out insignificant price changes and seems to be good in identifying the underlying trends.
What is the Phase Accumulation Cycle?
The phase accumulation method of computing the dominant cycle is perhaps the easiest to comprehend. In this technique, we measure the phase at each sample by taking the arctangent of the ratio of the quadrature component to the in-phase component. A delta phase is generated by taking the difference of the phase between successive samples. At each sample we can then look backwards, adding up the delta phases.When the sum of the delta phases reaches 360 degrees, we must have passed through one full cycle, on average.The process is repeated for each new sample.
The phase accumulation method of cycle measurement always uses one full cycle’s worth of historical data.This is both an advantage and a disadvantage.The advantage is the lag in obtaining the answer scales directly with the cycle period.That is, the measurement of a short cycle period has less lag than the measurement of a longer cycle period. However, the number of samples used in making the measurement means the averaging period is variable with cycle period. longer averaging reduces the noise level compared to the signal.Therefore, shorter cycle periods necessarily have a higher out- put signal-to-noise ratio.
Included
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Loxx's Special Phase Accumulation Cycle
Pips-Stepped MA of RSI Adaptive EMA [Loxx]Pips-Stepped MA of RSI Adaptive EMA is a pips-stepping, adaptive moving average that first, filers source input price using an EMA calculated using an RSI-modified alpha value and second, and last, its plugged into a pips-stepping algorithm to output the final chart signals. This is mainly a forex indicator although it can be used for any asset, but you must adjust the step size to pips relative to the asset, For Bitcoin this may be 5000 or more.
Included
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Loxx's RSI Variety RSI types
STD-Stepped VIDYA w/ Quantile Bands [Loxx]STD-Stepped VIDYA w/ Quantile Bands is a VIDYA moving average with Standard Deviation step filtering on either/neither/both price and VIDYA. Also included are quantile bands to identify breakouts/breakdowns/reversals.
What is VIDYA?
Variable Index Dynamic Average Technical Indicator ( VIDYA ) was developed by Tushar Chande. It is an original method of calculating the Exponential Moving Average ( EMA ) with the dynamically changing period of averaging.
What is Quantile Bands?
In statistics and the theory of probability, quantiles are cutpoints dividing the range of a probability distribution into contiguous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one less quantile than the number of groups created. Thus quartiles are the three cut points that will divide a dataset into four equal-size groups ( cf . depicted example). Common quantiles have special names: for instance quartile, decile (creating 10 groups: see below for more). The groups created are termed halves, thirds, quarters, etc., though sometimes the terms for the quantile are used for the groups created, rather than for the cut points.
q-Quantiles are values that partition a finite set of values into q subsets of (nearly) equal sizes. There are q − 1 of the q-quantiles, one for each integer k satisfying 0 < k < q. In some cases the value of a quantile may not be uniquely determined, as can be the case for the median (2-quantile) of a uniform probability distribution on a set of even size. Quantiles can also be applied to continuous distributions, providing a way to generalize rank statistics to continuous variables. When the cumulative distribution function of a random variable is known, the q-quantiles are the application of the quantile function (the inverse function of the cumulative distribution function) to the values {1/q, 2/q, …, (q − 1)/q}.
Included:
3 types of signal options
Alerts
Bar coloring
Loxx's Expanded Source Types
Pips-Stepped PDFMA [Loxx]Pips-Stepped PDFMA is and Pips-stepped moving average that uses a probability density function moving average. This is tuned for Forex. You must adjust the step size to extreme levels for this to work for crypto or stocks. Try 30000 for BTC on the daily chart, for example.
What is Probability Density Function?
Probability density function based MA is a sort of weighted moving average that uses probability density function to calculate the weights.
Included:
Bar coloring
Alerts
Expanded source types
Signals
Flat-level coloring for scalping
Pips-Stepped, OMA-Filtered, Ocean NMA [Loxx]Pips-Stepped, OMA-Filtered, Ocean NMA is an Ocean Natural Moving Average Filter that is pre-filtered using One More Moving Average (OMA) and then post-filtered using stepping by pips. This indicator is quadruple adaptive depending on the settings used:
OMA adaptive
Hiekin-Ashi Better Source Input Adaptive (w/ AMA of Kaufman smoothing)
Ocean NMA adaptive
Pips adaptive
What is the One More Moving Average (OMA)?
The usual story goes something like this : which is the best moving average? Everyone that ever started to do any kind of technical analysis was pulled into this "game". Comparing, testing, looking for new ones, testing ...
The idea of this one is simple: it should not be itself, but it should be a kind of a chameleon - it should "imitate" as much other moving averages as it can. So the need for zillion different moving averages would diminish. And it should have some extra, of course:
The extras:
it has to be smooth
it has to be able to "change speed" without length change
it has to be able to adapt or not (since it has to "imitate" the non-adaptive as well as the adaptive ones)
The steps:
Smoothing - compared are the simple moving average (that is the basis and the first step of this indicator - a smoothed simple moving average with as little lag added as it is possible and as close to the original as it is possible) Speed 1 and non-adaptive are the reference for this basic setup.
Speed changing - same chart only added one more average with "speeds" 2 and 3 (for comparison purposes only here)
Finally - adapting : same chart with SMA compared to one more average with speed 1 but adaptive (so this parameters would make it a "smoothed adaptive simple average") Adapting part is a modified Kaufman adapting way and this part (the adapting part) may be a subject for changes in the future (it is giving satisfactory results, but if or when I find a better way, it will be implemented here)
Some comparisons for different speed settings (all the comparisons are without adaptive turned on, and are approximate. Approximation comes from a fact that it is impossible to get exactly the same values from only one way of calculation, and frankly, I even did not try to get those same values).
speed 0.5 - T3 (0.618 Tilson)
speed 2.5 - T3 (0.618 Fulks/Matulich)
speed 1 - SMA , harmonic mean
speed 2 - LWMA
speed 7 - very similar to Hull and TEMA
speed 8 - very similar to LSMA and Linear regression value
Parameters:
Length - length (period) for averaging
Source - price to use for averaging
Speed - desired speed (i limited to -1.5 on the lower side but it even does not need that limit - some interesting results with speeds that are less than 0 can be achieved)
Adaptive - does it adapt or not
What is the Ocean Natural Moving Average?
Created by Jim Sloman, the NMA is a moving average that automatically adjusts to volatility without being programed to do so. For more info, read his guide "Ocean Theory, an Introduction"
What's the difference between this indicator and Sloan's original NMA?
Sloman's original calculation uses the natural log of price as input into the NMA , here we use moving averages of price as the input for NMA . As such, this indicator applies a certain level of Ocean theory adaptivity to moving average filter used.
Included:
Bar coloring
Alerts
Expanded source types
Signals
Flat-level coloring for scalping
ATR-Stepped PDF MA [Loxx]ATR-Stepped PDF MA is and ATR-stepped moving average that uses a probability density function moving average.
What is Probability Density Function?
Probability density function based MA is a sort of weighted moving average that uses probability density function to calculate the weights.
Included:
-Toggle on/off bar coloring
-Toggle on/off signals
-Alerts long/short
3-Pole Super Smoother w/ EMA-Deviation-Corrected Stepping [Loxx]3-Pole Super Smoother w/ EMA-Deviation-Corrected Stepping is an Ehlers 3-pole smoother with EMA deviations corrective stepping. This allows for greater response to volatility.
What is 3-pole Super Smoother?
A SuperSmoother filter is used anytime a moving average of any type would otherwise be used, with the result that the SuperSmoother filter output would have substantially less lag for an equivalent amount of smoothing produced by the moving average. For example, a five-bar SMA has a cutoff period of approximately 10 bars and has two bars of lag. A SuperSmoother filter with a cutoff period of 10 bars has a lag a half bar larger than the two-pole modified Butterworth filter. Therefore, such a SuperSmoother filter has a maximum lag of approximately 1.5 bars and even less lag into the attenuation band of the filter. The differential in lag between moving average and SuperSmoother filter outputs becomes even larger when the cutoff periods are larger.
What is EMA Deviation Corrected?
Dr. Alexander Uhl invented a method that he used to filter the moving average and to check for signals.
By definition, the Standard Deviation (SD, also represented by the Greek letter sigma σ or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis we usually use it to measure the level of current volatility.
Standard Deviation is based on Simple Moving Average calculation for mean value. The built-in MetaTrader 5 Standard Deviation can change that and can use one of the 4 basic types of averages for calculations. This version is not doing that. It is, instead, using the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA, we shall call it EMA deviation.
It is similar to Standard Deviation, but on a first glance you shall notice that it is "faster" than the Standard Deviation and that makes it useful when the speed of reaction to volatility is expected from any code or trading system.
Included:
-Color bars
-Loxx's Expanded Source Types
Pips Stepped VHF-Adaptive VMA w/ Expanded Source Types [Loxx]Pips Stepped VHF-Adaptive VMA w/ Expanded Source Types is a volatility adaptive Variable Moving Average (VMA) with stepping by pips.
What is Variable Moving Average (VMA)?
VMA (Variable Moving Average) is often mistakenly confused with the VIDYA (Volatility Index Dynamic Average) which is not strange since Tushar Chande took part in developing both. But the VMA was preceding the VIDYA and should not be mistaken for it.
What is Vertical Horizontal Filter (VHF)?
Vertical Horizontal Filter (VHF) was created by Adam White to identify trending and ranging markets. VHF measures the level of trend activity, similar to ADX in the Directional Movement System. Trend indicators can then be employed in trending markets and momentum indicators in ranging markets.
VMA, as is, is a "good candidate" for this type of filtering since it tends to produce prolonged periods of nearly horizontal values when the volatility of the market is low, so, when the step filtering is applied to it, the small slope changes that are happening as a results of the semi EMA calculation are filtered out, and signals are becoming more usable.
Included:
-Color bars
-Show signals
-Long/short alerts
STD-Stepped, CFB-Adaptive Jurik Filter w/ Variety Levels [Loxx]STD-Stepped, CFB-Adaptive Jurik Filter w/ Variety Levels is a Composite Fractal Behavior, single/double Jurik filter with floating boundary levels, alerts, and signals.
What is Composite Fractal Behavior ( CFB )?
All around you mechanisms adjust themselves to their environment. From simple thermostats that react to air temperature to computer chips in modern cars that respond to changes in engine temperature, r.p.m.'s, torque, and throttle position. It was only a matter of time before fast desktop computers applied the mathematics of self-adjustment to systems that trade the financial markets.
Unlike basic systems with fixed formulas, an adaptive system adjusts its own equations. For example, start with a basic channel breakout system that uses the highest closing price of the last N bars as a threshold for detecting breakouts on the up side. An adaptive and improved version of this system would adjust N according to market conditions, such as momentum, price volatility or acceleration.
Since many systems are based directly or indirectly on cycles, another useful measure of market condition is the periodic length of a price chart's dominant cycle, (DC), that cycle with the greatest influence on price action.
The utility of this new DC measure was noted by author Murray Ruggiero in the January '96 issue of Futures Magazine. In it. Mr. Ruggiero used it to adaptive adjust the value of N in a channel breakout system. He then simulated trading 15 years of D-Mark futures in order to compare its performance to a similar system that had a fixed optimal value of N. The adaptive version produced 20% more profit!
This DC index utilized the popular MESA algorithm (a formulation by John Ehlers adapted from Burg's maximum entropy algorithm, MEM). Unfortunately, the DC approach is problematic when the market has no real dominant cycle momentum, because the mathematics will produce a value whether or not one actually exists! Therefore, we developed a proprietary indicator that does not presuppose the presence of market cycles. It's called CFB (Composite Fractal Behavior) and it works well whether or not the market is cyclic.
CFB examines price action for a particular fractal pattern, categorizes them by size, and then outputs a composite fractal size index. This index is smooth, timely and accurate
Essentially, CFB reveals the length of the market's trending action time frame. Long trending activity produces a large CFB index and short choppy action produces a small index value. Investors have found many applications for CFB which involve scaling other existing technical indicators adaptively, on a bar-to-bar basis.
What is Jurik Volty used in the Juirk Filter?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is the Jurik Moving Average?
Have you noticed how moving averages add some lag (delay) to your signals? ... especially when price gaps up or down in a big move, and you are waiting for your moving average to catch up? Wait no more! JMA eliminates this problem forever and gives you the best of both worlds: low lag and smooth lines.
Ideally, you would like a filtered signal to be both smooth and lag-free. Lag causes delays in your trades, and increasing lag in your indicators typically result in lower profits. In other words, late comers get what's left on the table after the feast has already begun.
Included:
-Color bars
-Color background
-Color trend
-Color deadzones
-Show signals
-Long/short alerts
-ATR and quantile based levels
STD Stepped Ehlers Optimal Tracking Filter MTF w/ Alerts [Loxx]STD Stepped Ehlers Optimal Tracking Filter MTF w/ Alerts is the traditional Ehlers Optimal Tracking Filter but with stepped price levels, access to multiple time frames, and alerts.
What is Ehlers Optimal Tracking Filter?
From "OPTIMAL TRACKING FILTERS" by John Ehlers:
"Dr. R.E. Kalman introduced his concept of optimum estimation in 1960. Since that time, his technique has proven to be a powerful and practical tool. The approach is particularly well suited for optimizing the performance of modern terrestrial and space navigation systems. Many traders not directly involved in system analysis have heard about Kalman filtering and have expressed an interest in learning more about it for market applications. Although attempts have been made to provide simple, intuitive explanations, none has been completely successful. Almost without exception, descriptions have become mired in the jargon and state-space notation of the “cult”.
Surprisingly, in spite of the obscure-looking mathematics (the most impenetrable of which can be found in Dr. Kalman’s original paper), Kalman filtering is a fairly direct and simple concept. In the spirit of being pragmatic, we will not deal with the full-blown matrix equations in this description and we will be less than rigorous in the application to trading. Rigorous application requires knowledge of the probability distributions of the statistics. Nonetheless we end with practically useful results. We will depart from the classical approach by working backwards from Exponential Moving Averages. In this process, we introduce a way to create a nearly zero lag moving average. From there, we will use the concept of a Tracking Index that optimizes the filter tracking for the given uncertainty in price movement and the uncertainty in our ability to measure it."
Included:
-Standard deviation stepping filter, price is required to exceed XX deviations before the moving average line shifts direction
-Selection of filtering based on source price, the moving average, or both; you can also set the Filter deviations to 0 for no filtering at all
-Toggle on/off bar coloring
-Toggle on/off signals
-Long/Short alerts