Squeeze Momentum Indicator [LazyBear] vHMAThis is a remake of the famous LazyBear Indicator, the Squeeze Momentum Indicator.
All i did was take out the SMA's and replace them with HMA's. HMA is a more responsive moving average.
Hull Moving Average.
This is a derivative of John Carter's "TTM Squeeze" volatility indicator, as discussed in his book "Mastering the Trade" (chapter 11).
Black crosses on the midline show that the market just entered a squeeze ( Bollinger Bands are with in Keltner Channel). This signifies low volatility , market preparing itself for an explosive move (up or down). Gray crosses signify "Squeeze release".
Mr.Carter suggests waiting till the first gray after a black cross, and taking a position in the direction of the momentum (for ex., if momentum value is above zero, go long). Exit the position when the momentum changes (increase or decrease --- signified by a color change). My (limited) experience with this shows, an additional indicator like ADX / WaveTrend, is needed to not miss good entry points. Also, Mr.Carter uses simple momentum indicator , while I have used a different method (linreg based) to plot the histogram.
More info:
- Book: Mastering The Trade by John F Carter
Here is the original version:
HMA
KILTED TREND PILOTDescription: Uses the Hull Moving Average ( HMA ) and MACD to observe the following strategy, to assist with trade setups and provide confluence. It is especially effective when used with the Kilted Strength Meter to make sure there is an active trend and the market is not moving sideways.
SETTINGS AND EXPLANATION
1. The strategy is a very simple and visual one where you go:
• Long when the short HMA colour matches the long HMA colour (which is when the 2 colours are blue for a long position).
• Short when the short HMA colour matches the long HMA colour (which is when the 2 colours are red for a short position)
2. Ideally you want to enter a trade when the market is trending and not moving sideways, hence the reason the Kilted Strength Meter makes a great companion to complement this strategy
The V_Wave: Volatility Adaptive Moving AverageThis is work in progress - but i wanted to see if there's interest to use or test it - or if someone finds it useful. there's already a crowd of great moving averages out there :)
This is a different type of zero-lag weighted moving average - and it's a concept that i have been working on for a while now. Given that this is WIP, i decided to keep the code protected for now.
The idea is to create a moving average that responds faster to the changes in the underlying data - which is the case with other zero-lag moving averages - but in this case, i also wanted to make it adaptive, so it accelerate when the volatility increases and at the same time, maintain limited lag and reasonable smoothing, even at longer length.
How Does it Compare to other MA's
==============================
in the chart, we can see a comparison between the V_Wave (thick yellow line) and the 3 common MAs, Hull Moving Average (HMA, aqua), a Weighted Moving Average (WMA, brown) and an Exponential Moving Average (EMA, grey)
the most important advantage in V_Wave, is because of the way the algorithm works, and that it maintains direct association with the underlying data and the given length, the V_Wave will have less overshoot when compared to other moving averages - i.e, it stays closer to the underlying data points at times of quick reversals or big changes - like the V reversal on the right of the chart. You can also test it against other MAs you may be already using and share your findings back with me.
settings:
=========
- the settings provide the ability to choose the source data (close vs hl2, ..etc), the length, and the ability to adjust the "aggressiveness" of the line (Accelerator) ..
- this accelerator is the factor that tells the V_Wave how fast to respond to the volatility changes. when you increase the accelerator, the V_Wave is more aggressive, and will respond faster to changes in volatility -- it becomes more responsive to changes in the trend, but that will sacrifice the smoothness of the line.
- i capped this value to 7, because beyond that, the accelerator will have a diminished effect.
- Also note that due to association with volatility, the V_Wave will behave differently at lower time frames -- and becomes closer to an EMA but better (in responsiveness) than a WMA.
- the smoothing is built-in for now, and will adjust based on the length, in a way similar to how HMA smoothing works (see my previous post on Evolving the Zero Lag MA for details on that) - in future versions, i may make it a manual entry or a selection between manual/automatic
Usage:
=======
Use the V_Wave as you use other moving averages - once you get to know how it behaves and adapts to underlying data changes.
you can use it as a filter to generate signals once it crosses other MAs, or another V_Wave of a different length / acceleration.
will be great if you share your test results and your use cases to help me improve how the V_Wave works.
best of luck!
TA Basics: Evolving our Zero Lag Moving Average.In the previous Zero-Lag MA post, we introduced the "mirroring" technique and the associated calculation.
In this post, we will see how we can use the same technique, with a slight variation, to evolve our zero lag moving average line, add more "smoothness" and still maintaining the low lag and fast response to data series changes.
to use the "mirroring" technique, we need to use 2 MA lines with varying speeds - this is essential to produce the delta between the lines, that can then be mirrored around the fast line to produce the final line. in the first example, we used a Simple MA (slow) and a Weighted MA (fast) of the same length to achieve that.
here we introduce a different way of doing that. we will use a Weighted MA of the length (slow) and another Weighted MA of half the length (fast) -- the difference in "speed" between these 2 lines should produce the delta we need, we mirror it around the fast line, and we get our desired Zero-lag line. Check!
then while we're at it, why don't we introduce an additional smoothing just to ensure the new line is not too "broken" and jumpy .. and flows smoothly across the data series. but what length should we use for smoothing?
smoothing length should be enough to make an actual smoothing effect, but not too large else it will introduce lagging on its own. how about 3? usually 3 or 4 are good values for smoothing. A brilliant idea here is to use a number related to the same input length of the original line, which can always be relatively small -- the square root (integer portion) of that original length - and in that case, the user will only need to enter 1 input for the moving average, just the length - everything will be calculated from there. Check again!
I commented the code if you like to follow the simplified build-up of the formula, now that the concept is explained.
the (more complex-looking) 1-line, condensed form of that formula to use is (alert: watch out for the ()'s -- they're tricky :) )
----------------------------------------------
ZLMA_Line = wma((2*wma(close,int(length/2)) - wma(close,length)), int(sqrt(length)))
------------------------------------------
the one thing i do not like about this technique, is that we introduce the use of the half length MA. i do not like to build indicators that make decisions like this on behalf of the trader - the trader wants to analyze the data for a specific length, and we should continue to stick to that consistently across the moving average (or whatever indicator) calculation. I would always be caution about "hardcoding" some optional values (in this case 0.5 * length) within the indicator itself - others may not mind that.
Now to a nice surprise for the patient folks who got so far in this post - Congratulations, we have just discovered the concept and the formula behind the famous Hull Moving Average .. the big thing here is, we just had the opportunity to learn how to create the whole thing ourselves from the ground up step by step, and had fun doing it (I hope!)
-- these posts are meant to provide those who are new to the world of technical analysis and want to learn how and why to build their own technical indicators. i hope some of you find them useful and interesting, and i wish you the best of luck.
Bollinger Bands Plus [xdecow]Bollinger bands with the option to use different types of moving averages.
-SMA
-EMA
-RMA
-WMA
-VWMA
-SWMA
-DEMA
-HMA
-SMMA
-T3
-TEMA
HMA-Crossover AlertsThis simple script plots bullish and bearish Hull Moving Average Crossovers and fires Alerts when long or short conditions are met.
Forex&Co Baseline - Multi ChoiceBest baseline indicator with multiple choice and bar colour. Easy to use and very effective.
Moving Averages Linear CombinatorLinearly combining moving averages can provide relatively interesting results such as a low-lagging moving averages or moving averages able to produce more pertinent crosses with the price.
As a remainder, a linear combination is a mathematical expression that is based on the multiplication of two variables (or terms) with two coefficients (also called scalars when working with vectors) and adding the results, that is:
ax + by
This expression is a linear combination , with x/y as variables and a/b as coefficients. Lot of indicators are made from linear combinations of moving averages, some examples include the double/triple exponential moving average, least squares moving average and the hull moving average.
Today proposed indicator allow the user to combine many types of moving averages together in order to get different results, we will introduce each settings of the indicator as well as how they affect the final output.
Explaining The Effects Of Linear Combinations
There are various ways to explain why linear combination can produce low-lagging moving averages, lets take for example the linear combination of a fast SMA of period p/2 and slow simple moving average of period p , the linear combination of these two moving averages is described as follows:
MA = 2SMA(p/2) + -1SMA(p)
Which is equivalent to:
MA = 2SMA(p/2) - SMA(p) = SMA(p/2) + SMA(p/2) - SMA(p)
We can see the above linear combinations consist in adding a bandpass filter to the fast moving average, which of course allow to reduce the lag. It is important to note that lag is reduced when the first moving average term is more reactive than the second moving average term. In case we instead use:
MA = -2SMA(p/2) + 1SMA(p)
we would have a combination between a low-pass and band-reject filter.
The Indicator
The indicator is based on the following linear combination:
Coeff × LeadingMA(length) - (Coeff-1) × LaggingMA(length)
The length setting control both moving averages period, leading control the type of moving average used as leading MA, while lagging control the type of MA used as lagging moving average, in order to get low lag results the leading MA should be more reactive than the lagging MA. Coeff control the coefficients of the linear combination, with higher values of coeff amplifying the effects of the linear combination, negative values of coeff would make a low-lag moving average become a lagging moving average, coeff = 1 return the leading MA, coeff = -1 return the lagging MA. The leading period divisor allow to divide the period of the leading MA by the selected number.
The types of moving average available are: simple, exponentially weighted, triangular, least squares, hull and volume weighted. The lagging MA allow you to select another MA on the chart as input.
length = 100, leading period divisor = 2, coeff = 2, with both MA type = SMA. Using coeff = -2 instead would give:
You can select "Plot leading and lagging" in order to show the leading and lagging MA.
Conclusion
The proposed tool allow the user to create a custom moving averages by making use of linear combination. The script is not that useful when you think about it, and might maybe be one of my worst, as it is relatively impractical, not proud of it, but it still took time to make so i decided to post it anyway.
Hull Moving Average 21,100,200,360,611,1597 methodhull moving averages have exceptional characteristics when determining the trend.
consequently I offer you a method that I have been studying for a while where the hull moving average of 21 periods is essential, since by reacting quickly to changes in the price you can make anticipations of the direction of the price very effective.
the use of the hna of 21 is simple once the consolidated price on the hma indicates a probable move upward. in the same way if consolidation occurs in the opposite direction, it would indicate a downward movement. On the other hand, I recommend using momentum or directional indicators such as adx.
the 360-period daughter proves to be a good way to determine the medium-term trend, as the price tends to touch this level in several occasions. The long-term trend will be determined by that of 1597. Just try and observe.
MATRIX HMA Filters and TrendlinesThis update to the previous HMA-Kahlman Trend, Clipping & Trendlines script features the same structure with the three modules:
- Trendlines module,
- NEW Winsorizing submodule using difference-based filtering.
- HMA-Kahlman Trend module.
The Winsorizing submodule filters signals by a volume level, eliminating the ones with the volume below a threshold. This module substitutes the previous 'low-level' filtering implementation. This time it filters out based on difference between scaled volume and its moving average.
Tested with BTCUSD .
Esta atualização do script HMA-Kahlman Trend, Clipping & Trendlines anterior apresenta a mesma estrutura nos três módulos:
- módulo Trendlines,
- NOVO sub-módulo Winsorizing usando filtragem baseada em diferenças.
- Módulo HMA-Kahlman Trend.
O submódulo Winsorizing filtra sinais por um nível de volume, eliminando aqueles com o volume abaixo de um limite. Este módulo substitui a implementação de filtragem 'baixo nível' anterior. Dessa vez, ele é filtrado com base na diferença entre o volume escalado e sua média móvel.
Testado com BTCUSD.
Fancy Moving Average [BigBitsIO]This script is for a single moving average with as many features as I can possibly fit into a single moving average. If you can think of more, or have questions regarding this script, please message me or contact me via social media.
Features:
- A single moving average (MA).
- Standard MA inputs.
- MA type.
- MA period.
- MA price.
- MA resolution (time frame).
- Visibility toggle.
- Fancy MA inputs.
- Toggle to show only candles included in the MA calculation ("Highlight inclusion") or display entire MA history.
- Toggle to show a ghost trail when Highlight inclusion is toggled on. Displays a shaded version of past MA history before the inclusion period (as seen on snapshot).
- Toggle to show forecast values for the MA.
- Other inputs related to forecasting:
- Forecast bias. (Neutral forecasts MA if the current price remains the same.)
- Forecast period.
- Forecast magnitude.
*** DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto. DYOR, TYOB. ***
Multiple MAsYou can set up to 5 moving averages (or more if you know how to edit the script), selecting from SMA, EMA, HMA, WMA, DEMA, TEMA or RMA. Select the source and the period for each MA.
Ultimate MA Cross IndicatorContinue to experiment with new labels functionality in TradingView. Created ma cross script with 9 different types of MA wit additional information box. In that box, I included the bars passed from the previous bull/bear cross.
Also you cand find there live distance between moving averages in price and ATRs , so you track how close are you from the next close.
Do you think this concept is useful? What information do you want to see in this kind of boxes?
These ma types are included in this indicator:
Simple Moving Average ( SMA )
Exponential Moving Average ( EMA )
Weighted Moving Average ( WMA )
Arnaud Legoux Moving Average ( ALMA )
Hull Moving Average ( HMA )
Volume-weighted Moving Average ( VWMA )
Least Square Moving Average ( LSMA )
Smoothed Moving Average ( SMMA )
Double Exponential Moving Average ( DEMA )
Hull SuiteHull is its extremely responsive and smooth moving average created by Alan Hull in 2005.
Minimal lag and smooth curves made HMA extremely popular TA tool.
alanhull.com
Script was made to regroup multiple hull variants in one indicator,maintaining flexible customization and intuitive visualization
Option to chose between 3 Hull variations
Option to chose between 2 visualization modes ( Bands or single line)
Option to Paint hull and/or candlesticks according to hulls trend
Shortcut for personalizing Line/band thickness,instead of changing every object manually ,there is global option in inputs
HMA
THMA ( 3HMA)
EHMA
HMA:
Alan Hull
EHMA:
Slower than hull by default.
Raudys, Aistis & Lenčiauskas, Vaidotas & Malčius, Edmundas. (2013). Moving Averages for Financial Data Smoothing ( 403. 34-45. 10.1007/978-3-642-41947-8_4.) Vilnius University, Faculty of Mathematics and Informatics
3HMA (THMA) :
Documentation on link below
alexgrover
Scripting Tutorial 7 - Triple Many Moving Averages ResolutionsThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Scripting Tutorial 6 - Triple Many Moving Averages ForecastingThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources and lookback periods.
Features:
- 3 Moving Averages with variable MA types, periods, price sources and ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked on my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Scripting Tutorial 5 - Triple Many Moving Averages CrossoversThis script is for a triple moving average indicator where the user can select from different types of moving averages and periods. This script improves upon tutorial 3 by adding source selection for MAs and another option for an MA that is not built-in, the HMA . It is meant as an educational script with well formatted styling, and references for specific functions.
Scripting Tutorial 4 - Triple Many Moving Averages ImprovedThis script is for a triple moving average indicator where the user can select from different types of moving averages and periods. This script improves upon tutorial 3 by adding source selection for MAs and another option for an MA that is not built-in, the HMA. It is meant as an educational script with well formatted styling, and references for specific functions.
Multiple HMA - bgeraghtyTo save space on a chart's maximum indicator count, this single indicator includes:
- Three Hull Moving Averages, Defaulted to 13, 26, and 55 Periods.
- Customizable Time-Frame for Each HMA.
- Customizable Triple Weighted MA Smoothing for Jagged Lines from Higher Time-Frame
- Alert Conditions for Price Cross Over/Under the HMAs.
Comparing different types of moving averagesA Study of Moving Average Types
// SMA Simple
// WMA Weighted
// VWMA Volume Weighted
// EMA Exponential
// DEMA Double EMA
// ALMA Arnaud Legoux
// HMA Hull MA
// SMMA Smoothed
// LSMA Least Squares
// KAMA Kaufman Adaptive
// TEMA Triple EMA
// ZLEMA Zero Lag
// FRAMA Fractal Adaptive
// VIDYA Variable Index Dynamic Average
// JMA Jurik Moving Average
// T3 Tillson
// TRIMA Triangular