a function for relative weighted average using arrays

82

Moving averages are filters on price data. This moving average creates a filter which factors in: - the price RSI or it's Momentum - the volume RSI - the RVI or Volatility Each factor is put through a least squares filter to smooth them first. Then the factors are used to build a coefficient for an exponentially weighted average. The chart above shows a...

255

Draws an Equally Weighted Index of 25 securities. The inputs are pre-populated with the Top 25 cryptocurrencies by market cap at the time of publishing the script, but any 25 securities can be used. Double click on this indicator's pane to view in full screen. Note: Candle open is always equal to previous candle's close. I did this to avoid problems where...

50

VAWMA = VWMA and WMA combined. Simply put, this attempts to determine the average price per share over time, weighted heavier for recent values. Uses triangular algorithm to taper off values in the past (same as WMA does). Why use this? Let's say the earliest bar of the VWMA has a huge amount of volume. That means that when the next bar arrives, there will be...

75

Can be extended with more derivative or spot pairs, see the comments in the code for instructions. Most importantly, the pairs need to be added to the respective arrays in the same order, so that the weights are applied to the correct pairs.

135

Resets at the start of the day's session (9:50 am on the ASX). Takes the first candle and checks if its a green candle (close > open), and adds the volume to a total (which starts at 0 at the start of the day). Subtracts it if the candles in red. Continues to do this along with all the candles. The volume is also multiplied by the difference between open and...

338

Volume !weighted! deviations. Important: I don't really know how people generally compute deviations from VWAP/VWMA, but smth tells me generally it's just a Av Dev/St Dev based on mean, not on appropriate basis, like volume weighted mean in our case. This version is mathematically correct, it first calculates weighted mean, than utilizes this weighted in mean...

202

As traders and investors now urge to console volume factors into their price action analysis. This script is an attempt to combine volume-weighted moving average (VWMA), volume-weighted average price (VWAP), along with the exponential moving average (EMA). I have found that this indicator works quite well with the stock market. How to use the indicator: Buy when...

95

This script is a compilation of several different stochastic indicators (and RSI) where the K value of each indicator is equally weighted. The purpose of the indicator is to combine many indicators together in a fashion that weights them easier. By default, the Stochastic and Stochastic RSI are both enabled - the idea is to speed up the relatively slower...

435

Couldn't find searching for Linearly Weighted Moving Average (LWMA) in tradingview. Found one with the LWMA title, but it uses plain WMA calculation without the linearity which more heavily weights recent price data, which I need, so I try to made one. LWMAs are also quicker to react to price changes than SMA and EMA. If you want a moving average with less lag...

622

The weighted close isn't an option for an input yet on TV so here is my contribution. It gives more weight to the close prices and I have included a signal line to look for buy and sell signals. Buy when the indicator goes over its signal line and sell when it falls below it. This was a special request so let me know what other scripts you would like to see me...

164

The End Point Moving Average was created by Patrick E. Lafferty (Stocks & Commodities V13 (413-417)) and it is essentially a variation of the weighted moving average but the weight system is different. Feel free to change the offset and length amounts to adjust to your needs but I'm using the default amounts in my script. This hugs the price very closely and I...

50

This indicator will show the swing high and lows for the number of bars back. It's very easy to use and shows good support and resistance levels. I then took it a step further and added a moving average with all the standard types in my indicators: SMA EMA Weighted Hull Symmetrical Volume Weighted Wilder Linear Regression I then added Bollinger Bands to show...

137

This is another indicator that I have created that is my favorite script yet for a weighted moving average. This indicator is very similiar to a classic weighted moving average but in this version I'm cubing the weights. It hugs the price very closely as you can see and of course buy when the indicator line is green and sell when it is red. Let me know if you...

104

The Variable Power Weighted Moving Average was created by RedKTrader so make sure you follow them! This is a very handy indicator where you can change the weights of the weighted moving average yourself! For an easy guide here are common values to use to convert this indicator into other indicators: Power = 0 = Simple Moving Average Power = 0.5 = Square Root...

120

The Optimal Weighted Moving Average was created by Thomas Hutchinson and Peter G. Zhang, Ph.D. (Stocks & Commodities V. 11:12 (500-505)) and it is very similar to a classic weighted moving average but it uses the correlation between the input and the optimal weighted moving average output to use as the weights. Buy when the line turns green and sell when it turns...

368

In the previous 2 posts in this series, we played around with simple math concepts to create a zero-lag moving average that can deliver fast response and less lag - that we can use to enable better trend following, or as filter / signal. here we take a step further - instead of using equal weight for the moving average (as in the Simple moving average) or linear...

116