Square Root Moving AverageAbstract
This script computes moving averages which the weighting of the recent quarter takes up about a half weight.
This script also provides their upper bands and lower bands.
You can apply moving average or band strategies with this script.
Introduction
Moving average is a popular indicator which can eliminate market noise and observe trend.
There are several moving average related strategies used by many traders.
The first one is trade when the price is far from moving average.
To measure if the price is far from moving average, traders may need a lower band and an upper band.
Bollinger bands use standard derivation and Keltner channels use average true range.
In up trend, moving average and lower band can be support.
In ranging market, lower band can be support and upper band can be resistance.
In down trend, moving average and upper band can be resistance.
An another group of moving average strategy is comparing short term moving average and long term moving average.
Moving average cross, Awesome oscillators and MACD belong to this group.
The period and weightings of moving averages are also topics.
Period, as known as length, means how many days are computed by moving averages.
Weighting means how much weight the price of a day takes up in moving averages.
For simple moving averages, the weightings of each day are equal.
For most of non-simple moving averages, the weightings of more recent days are higher than the weightings of less recent days.
Many trading courses say the concept of trading strategies is more important than the settings of moving averages.
However, we can observe some characteristics of price movement to design the weightings of moving averages and make them more meaningful.
In this research, we use the observation that when there are no significant events, when the time frame becomes 4 times, the average true range becomes about 2 times.
For example, the average true range in 4-hour chart is about 2 times of the average true range in 1-hour chart; the average true range in 1-hour chart is about 2 times of the average true range in 15-minute chart.
Therefore, the goal of design is making the weighting of the most recent quarter is close to the weighting of the rest recent three quarters.
For example, for the 24-day moving average, the weighting of the most recent 6 days is close to the weighting of the rest 18 days.
Computing the weighting
The formula of moving average is
sum ( price of day n * weighting of day n ) / sum ( weighting of day n )
Day 1 is the most recent day and day k+1 is the day before day k.
For more convenient explanation, we don't expect sum ( weighting of day n ) is equal to 1.
To make the weighting of the most recent quarter is close to the weighting of the rest recent three quarters, we have
sum ( weighting of day 4n ) = 2 * sum ( weighting of day n )
If when weighting of day 1 is 1, we have
sum ( weighting of day n ) = sqrt ( n )
weighting of day n = sqrt ( n ) - sqrt ( n-1 )
weighting of day 2 ≒ 1.414 - 1.000 = 0.414
weighting of day 3 ≒ 1.732 - 1.414 = 0.318
weighting of day 4 ≒ 2.000 - 1.732 = 0.268
If we follow this formula, the weighting of day 1 is too strong and the moving average may be not stable.
To reduce the weighting of day 1 and keep the spirit of the formula, we can add a parameter (we call it as x_1w2b).
The formula becomes
weighting of day n = sqrt ( n+x_1w2b ) - sqrt ( n-1+x_1w2b )
if x_1w2b is 0.25, then we have
weighting of day 1 = sqrt(1.25) - sqrt(0.25) ≒ 1.1 - 0.5 = 0.6
weighting of day 2 = sqrt(2.25) - sqrt(1.25) ≒ 1.5 - 1.1 = 0.4
weighting of day 3 = sqrt(3.25) - sqrt(2.25) ≒ 1.8 - 1.5 = 0.3
weighting of day 4 = sqrt(4.25) - sqrt(3.25) ≒ 2.06 - 1.8 = 0.26
weighting of day 5 = sqrt(5.25) - sqrt(4.25) ≒ 2.3 - 2.06 = 0.24
weighting of day 6 = sqrt(6.25) - sqrt(5.25) ≒ 2.5 - 2.3 = 0.2
weighting of day 7 = sqrt(7.25) - sqrt(6.25) ≒ 2.7 - 2.5 = 0.2
What you see and can adjust in this script
This script plots three moving averages described above.
The short term one is default magenta, 6 days and 1 atr.
The middle term one is default yellow, 24 days and 2 atr.
The long term one is default green, 96 days and 4 atr.
I arrange the short term 6 days to make it close to sma(5).
The other twos are arranged according to 4x length and 2x atr.
There are 9 curves plotted by this script. I made the lower bands and the upper bands less clear than moving averages so it is less possible misrecognizing lower or upper bands as moving averages.
x_src : how to compute the reference price of a day, using 1 to 4 of open, high, low and close.
len : how many days are computed by moving averages
atr : how many days are computed by average true range
multi : the distance from the moving average to the lower band and the distance from the moving average to the lower band are equal to multi * average true range.
x_1w2b : adjust this number to avoid the weighting of day 1 from being too strong.
Conclusion
There are moving averages which the weighting of the most recent quarter is close to the weighting of the rest recent three quarters.
We can apply strategies based on moving averages. Like most of indicators, oversold does not always means it is an opportunity to buy.
If the short term lower band is close to the middle term moving average or the middle term lower band is close to the long term moving average, it may be potential support value.
References
Computing FIR Filters Using Arrays
How to trade with moving averages : the eight trading signals concluded by Granville
How to trade with Bollinger bands
How to trade with double Bollinger bands
Dynamicresistance
LIVIDITIUM EXTENDED BANDS {PREMIUM}This is the extended band/levels version of LIVIDITIUM Channel {PREMIUM}.
The LIVIDITIUM is a set of indicators centered around a series of parallel dynamic bands call the LVDT guide bands, defined by lines call the LVDT levels. Major LVDT levels have thicker line-widths.
LVDT levels are constructed from a mathematical conjugation of the complex golden ratio solutions.
>> Useful to determine critical levels, indicates possible support levels, as well as major and minor tops/bottoms.
Look at historical interactions to work out key levels for any particular chart, and adjust the displacement offset value to get the LVDT levels to conform better to a particular chart at a particular time-frame.
Note:
In no way is this intended as a financial/investment/trading advice. You are responsible for your own investment/trade decisions.
Please exercise your own judgement for your own trades base on your own risk-aversion level and goals as an investor or a trader. The use of OTHER indicators and analysis in conjunction (tailored to your own style of investing/trading) will help improve confidence of your analysis, for you to determine your own trade decisions.
Please PM me for access information.
( Bundled with LIVIDITIUM {PREMIUM})
LIVIDITIUM Channel {PREMIUM}This is the LITE version of LIVIDITIUM {PREMIUM} -- with colored streaks highlighting oversold or overbought conditions along the LVDT-bands .
The LIVIDITIUM is a set of indicators centered around a series of parallel dynamic bands call the LVDT guide bands, defined by lines call the LVDT levels. Major LVDT levels have thicker line-widths.
LVDT levels are constructed from a mathematical conjugation of the complex golden ratio solutions.
>> Useful to determine critical levels, indicates possible support levels, as well as major and minor tops/bottoms.
Look at historical interactions to work out key levels for any particular chart, and adjust the displacement offset value to get the LVDT levels to conform better to a particular chart at a particular time-frame.
Note:
In no way is this intended as a financial/investment/trading advice. You are responsible for your own investment/trade decisions.
Please exercise your own judgement for your own trades base on your own risk-aversion level and goals as an investor or a trader. The use of OTHER indicators and analysis in conjunction (tailored to your own style of investing/trading) will help improve confidence of your analysis, for you to determine your own trade decisions.
Please PM me for access information.
( Bundled with LIVIDITIUM {PREMIUM})
Dynamic Volume Profile v2 (Up To 60 Channels)Dynamic Volume Profile (DVP) is an advanced charting study that displays trading activity over a specified time period at specified price levels dynamically.
DVP typically based on price and volume information and it combines these factors in a way that displays price, volume and time frame on a single chart dynamically. You can gather a multitude of information with a glance.
The first thing that most traders will use dynamic volume profile for is identifying basic support and resistance levels. It is important to note that using Dynamic Volume Profile as an identifier for support and resistance levels is a reactive method.
Point of Control ( PoC ): It refers to the area in the chart with the most traded volume activity. This is by far the most relevant area you want to monitor as it can help to define the placement of your stops or the areas in the chart where you might find the most pristine entry levels. The highest concentrated area of volume for a particular period of time we will call it PoC or Point of Control and you will be surprised how many times it acts as a wall on a retest. Traders tend to factor this in as an area of support or resistance.
Value Area ( VA ): The range of price levels in which a specified percentage of all volume was traded. By default, the industry standards tends to be 70%.
Value Area High ( VAH ) – The highest price level within the value area.
Value Area Low ( VAL ) – The lowest price level within the value area.
The script creates up to 60 channels according to highest/lowest levels for specified time period and finds the total volume for each channel. Then it calculates Point of Control, Value area and VAH/VAL. the script shows POC channel and Value Area, and you can see VAH/VAL ve all channels optionally.
In this version, number of channels can be changed up to 60 optionally by user
If you find my works useful, please consider a donation
BTC: 19qDW9AShZhBZsGuXcgRzam5Fbpc3EU8EV
ETH: 0x39c8552371b9b7f4e324197af460ba8bc8e18ef9
Dynamic Volume Profile [LTB]Dynamic Volume Profile (DVP) is an advanced charting study that displays trading activity over a specified time period at specified price levels dynamically.
DVP typically based on price and volume information and it combines these factors in a way that displays price, volume and time frame on a single chart dynamically. You can gather a multitude of information with a glance.
The first thing that most traders will use dynamic volume profile for is identifying basic support and resistance levels. It is important to note that using Dynamic Volume Profile as an identifier for support and resistance levels is a reactive method.
Point of Control (PoC): It refers to the area in the chart with the most traded volume activity. This is by far the most relevant area you want to monitor as it can help to define the placement of your stops or the areas in the chart where you might find the most pristine entry levels. The highest concentrated area of volume for a particular period of time we will call it PoC or Point of Control and you will be surprised how many times it acts as a wall on a retest. Traders tend to factor this in as an area of support or resistance.
Value Area (VA): The range of price levels in which a specified percentage of all volume was traded. By default, the industry standards tends to be 70%.
Value Area High (VAH) – The highest price level within the value area.
Value Area Low (VAL) – The lowest price level within the value area.
The script creates 10 channels according to highest/lowest levels for specified time period and finds the total volume for each channel. Then it calculates Point of Control, Value area and VAH/VAL. the script shows POC channel and Value Area, and you can see VAH/VAL ve all channels optionally.
Some useful resources:
www.tradingview.com
medium.com
If you find my works useful, please consider a donation
BTC: 16XRqyS3Vgh1knAU1tCcruqhUrVm4QWWmR
Author: LonesomeTheBlue