End Point Moving Average [CC]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 think you will enjoy this script as much as I had making it. As always buy when the indicator line is green and sell when it is red!
Let me know if you would like me to publish other scripts or if you want something custom done!
Note: I'm republishing this because the original script couldn't be found in searches so this will fix that.
Weighted
CBG Swing HighLow MAThis 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 the standard deviation from the midline.
Finally, I added a simple bar coloring scheme: green if above the upper BB, Red if below and orange if in the middle.
I am just testing this out so please use with caution. If anyone in the community wants to run some backtests, that would be great and we would all appreciate it.
Of course you can keep it all simple and turn off all the moving averages and bollinger bands.
Enjoy! :-)
Cubed Weighted Moving AverageThis 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 would like me to publish other scripts or if you want something custom done!
Variable Power Weighted Moving AverageThe 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 Weighted Moving Average
Power = 1 = Weighted Moving Average
Power = 2 = Squared Weighted Moving Average
Try it out and let me know what you think!
Let me know if you have other ideas for me or if you want something custom done!
Optimal Weighted Moving AverageThe 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 red.
Let me know if you would like to see me publish any other scripts or if you want something custom done!
TA Basics: Creating a Fibonacci Weighted Moving AverageIn 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 weights (as in the weighted moving average), we get to pick THE MAGIC SEQUENCE, Fibonacci.
we will use the Fibonacci Sequence as weights to produce our moving average - so practically, we create a "Fibonacci Weighted Moving Average" (let's call it FiMA) - and compare the result with other commonly-used moving averages of the same length
in a Fibonacci moving average, the data will be weighted based on the Fibonacci Series starting from 1 (for the furthest data point)
so for example, if we use a length of 10, the weights will be 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 with the 55 being the weight applied to the most recent / current bar's selected value (close, hl2, hc3..etc) and moving backward
before i posted this script, i searched around to see if someone else has already wrote this - i found a couple, but the approach we use here in this code is different - i can't claim it to be more efficient - i honestly don't know - but the resulting code here, IMHO, is more compact and easier to integrate in other studies that you may like to put together to leverage this idea, to create your own indicators and strategies.
the reason the code here is more compact, is that it utilizes a shorter formula to calculate the FIb(n) - i included the source where i found that formula, and i tested it before using it in the code.
i also added an optional "extra smoothing" for the resulting MA, by simply calling the fima() function a second time (so like doing a 2-pass filter), with a smaller length on the result of the 1st pass. keep this smoothing small not to produce too much lag.
i like the outcome when compared to other moving averages - it has a fast response to data/trend change and less overshoot - but honesty i didn't see any real "Fibonacci Magic" :) .. but i'll leave the final judgement to those who use it - this is more of an experimental code in all cases - please feel free to use, change and share feedback.
Squared Weighted Moving AverageThe Squared Weighted Moving Average is similar to the classic Weighted Moving Average but the difference is that it squares the weights instead of the classic weight values. Buy if the indicator line is green and sell when it goes red.
Let me know if you would like to see any more scripts from me or if you want something custom done!
Weighted Bank MovementThe indicator comprises of a solid line that moves from -100 to +100 signifying the % of weighted movement among 12 banking stock constituting to the BANK NIFTY movement.
A positive value denotes the percentage of banks among the 12 banks that are trading above the previous HLC average ( High , Low , Close ) and vice versa a negative value denotes the percentage of banks trading below the previous HLC ( High , Low , Close ) average.
Comments and feedback are welcome.
Should you have any doubts or wish to access the script then please feel free to DM me.
Square Root Weighted Moving AverageThe Square Root Weighted Moving Average is similar to the classic Weighted Moving Average but the difference is that it uses the square root of the weights instead of the classic weight values. Buy if the indicator line is green and sell when it goes red.
Let me know if you would like to see any more scripts from me or if you want something custom done!
CBG MultiAverages ColorsThe latest version of my multiple moving averages. Now includes up to 14 moving averge lines plus a separate slow and fast moving average that can be assigned a different MA type.
In the screen shot is the fast/slow set to Hull with 15/50 periods. It is overlaid on top of my Key Numbers indicator.
7 moving averages in 1 indicator, including the Hull Moving Average .
SMA
EMA
Weighted
Hull
Symetrical
Volume Weighted
Wilder
Linear Regression
Lots of other features like background shading and paint bar colors.
Weighted Average Calculator - evoTest version of a weighted average calculator, will make an update later with more functions and a better view.
For now it's mainly useful for getting an average value and see how you can ladder into your position,
if you use the weights as the amount you want to order, you can see the total value and expected loss in the label.
You can use the weights as percentage or any numbers you like, but expected loss won't apply to that for now (before update)
5 values and weights available
If you have ideas to add anything or find mistakes send me a message.
Calculator (weighted) - evoA tool to calculate the average price and position size.
The "Risk Amount" input means the amount of dollars you lose if the trade gets stopped out (it should be based on a small percentage of your account).
TIPS
- If you use the weights to calculate an average price, make sure it adds up to 100% in total or you will get a weird number.
- Keep an eye on the risk amount if you take a trade, if I ever update the script it might set back to default which will change your position size.
- I tested it all but you might trade in a different way than me, so do your own calculation for every new thing you try with it.
If you find any bug please tell me so that no one ends up with a weird calculation or position size.
RSI background by AvesTradingHello,
This is RSI indicator that shows background color, when proper levels reached, instead of line in another pane. Customizable options are available:
- source
- length
- overbought level
- oversold level
I have added as well RMA of RSI for extra confirmation if needed. I hope you enjoy and will leave me some feedback! Don't forget to follow me for new releases.
Cheers
Aves
Please remember that the indicators provided by me are for educational purposes only.
HLC3_VWAP_Fib_RibbonThis Script use Volume Weighted Average Price (VWAP) combined with Fibonacci Deviations of that value as Ribbons to show Support and Resistance levels, as well as estimate good Buy and Sell areas based on the extremity of distance from the central VWAP.
Features:
- Alerts exist for price crossover / crossunder the VWAP value, as well as any of the Fib Ribbon levels.
- Ribbons & Fills can be toggled on/off, leaving just the VWAP as a single line if desired.
- Using the Amplification setting, you can expand or contract the ribbons while maintaining the Fib Ratio, to fit different time-frames and volatility.
- Time-Frame and Length of VWAP can be changed while staying on the same Time-Frame chart view.
Volume Weighted RSI [ChuckBanger]This is volume weighted RSI (Relative Strength Index). In compressing to regular RSI it look like this:
The relative strength index detect an overbought/sold market when higher/lower than a certain level, often 80/20. An overbought market is more attractive to sell because prices are no longer attractive to buy, it has reached its value of interest for traders looking to go long, we can then expect the price to correct and start a trend of opposite direction, while an oversold market is more attractive to buy based on the same logic.
The idea of talking about overbought and oversold without taking into account the volume can be a bit strange, since volume is directly related to the market traded, an higher volume can show sign of a more active market, which can describe the terms : overbought/sold a bit better. The money flow index for example, use volume, but it is interesting to provide other alternatives like this indicator.
With OB and OS signals
Decaying Rate of Change Non Linear FilterThis is a potential solution to dealing with the inherent lag in most filters especially with instruments such as BTC and the effects of long periods of low volatility followed by massive volatility spikes as well as whipsaws/barts etc.
We can try and solve these issues in a number of ways, adaptive lengths, dynamic weighting etc. This filter uses a non linear weighting combined with an exponential decay rate.
With the non linear weighting the filter can become very responsive to sudden volatility spikes. We can use a short length absolute rate of change as a method to improve weighting of relative high volatility.
c1 = abs(close - close ) / close
Which gives us a fairly simple filter :
filter = sum(c1 * close,periods) / sum(c1,periods)
At this point if we want to control the relative magnitude of the ROC coefficients we can do so by raising it to a power.
c2 = pow(c1, x)
Where x approaches zero the coefficient approaches 1 or a linear filter. At x = 1 we have an unmodified coefficient and higher values increase the relative magnitude of the response. As an extreme example with x = 10 we effectively isolate the highest ROC candle within the window (which has some novel support resistance horizontals as those closes are often important). This controls the degree of responsiveness, so we can magnify the responsiveness, but with the trade off of overshoot/persistence.
So now we have the problem whereby that a highly weighted data point from a high volatility event persists within the filter window. And to a possibly extreme degree, if a reversal occurs we get a potentially large "overshoot" and in a way actually induced a large amount of lag for future price action.
This filter compensates for this effect by exponentially decaying the abs(ROC) coefficient over time, so as a high volatility event passes through the filter window it receives exponentially less weighting allowing more recent prices to receive a higher relative weighting than they would have.
c3 = c2 * pow(1 - percent_decay, periods_back)
This is somewhat similar to an EMA, however with an EMA being recursive that event will persist forever (to some degree) in the calculation. Here we are using a fixed window, so once the event is behind the window it's completely removed from the calculation
I've added Ehler's Super Smoother as an optional smoothing function as some highly non linear settings benefit from smoothing. I can't remember where I got the original SS code snippet, so if you recognize it as yours msg me and I'll link you here.
Farey Sequence Weighted Moving AverageA moving average that weighted with Farey fractions. It matches a standard linear weighted average almost one-to-one. Why? Because both averages have strictly monotonic weighting sequences and assign a higher weight to latests data. So, Farey weights are just scaled to linear ones. Instead of specifing period you specify an order of Farey sequence. To learn more about Farey sequence you can refer to Wiki
Published just for reference, it is not intended for trading purposes.
MMDVZ 1.0 - Moving Multi-Day VWAP ZonesVolatility adjusted moving multi-day VWAP zones
Directionality, trend and support/resistance levels at a glance
Useful for trading practically all kinds of stocks and futures.
Works well with many timeframes.
More updates to come, stay tuned
Volume Weighted DistanceThis script holds several useful functions from statistics and machine learning (ML) and takes measurement of a volume weighted distance in order to identify local trends. It attempts at applying ML techniques to time series processing, shows how different distance measures behave and gives you an arsenal of tools for your endeavors. Tested with BTCUSD.
REM: oddly enough, many people forget that the scripts in PS are generally just STUDIES, i.e. exercises, experiments, trials, and do not embody a final solution. Please treat them as intended ;))
Forecasting - Locally Weighted Regression (rescaled)UPDATE: the original version works only with BTC. Here's a general version with rescaling.
Forecasting - Vanilla Locally Weighted RegressionThere is not much to say - just vanilla locally weighted regression in PineScript 4.
see: medium.com
also: cs229.stanford.edu
Forecasting - Locally Weighted RegressionThis is a continuation of the series on forecasting techniques.
Locally weighted linear regression is a non-parametric algorithm, that is, the model does not learn a fixed set of parameters as is done in ordinary linear regression. Rather parameters Θ (theta) are computed individually for each query point x. While computing Θ, a higher “preference” is given to the points in the training set lying in the vicinity of x than the points lying far away from x.
For a detailed discussion see www.geeksforgeeks.org
and for the formula see fawda123.github.io
Here you can see a shortcut application of this technique to time series with results unexpectedly favorable for price data labelling.
Good at detecting pullbacks. Can be incorporated into a trading system as a signal generator. Alerting is included.
Volume Weighted EMAAn EMA using the Volume Oscillator to integrate volume fluctuations into the EMA calculations.
Especially useful for Crypto and Forex