I was legitimately surprised no1 has already coded it out on TradingView, but you guys can copypaste & include it in Pine 5 if your see this xd Here is it. I've checked and double checked everything, the calculations are right, it can be proved by plotting mean, geometric mean & harmonic mean together and noticing that geometric mean will be always between...
The Zero Mean Roofing Filter was created by John Ehlers (Cycle Analytics For Traders pg 80) and this is a much more reactive roofing filter compared to Ehler's Roofing Filter which I also added for reference. Buy when the indicator rises over 0 and sell when the indicator falls below 0. This was a special request so let me know if there are other indicators you...
A good amount of users requested a text box showing various price statistics, the following script returns various of these stats in a user-selected range, and include classical ones such as a central tendency measurement (mean), dispersion (normalized range) and percent change, but also include less common statistics such as average traded volume and number of...
Sometimes the market data follows normal distribution, in these cases it is more appropriate to utilize mean-based statistical techniques. This script plots the special case of seven-number summary with 1st, 2nd & 3rd standard deviations below and above the mean. It also has "Log-space" switch which should be checked while using logarithmic scale. The next...
Range Strength is a super simple indicator designed for the mean reversion (range trading) strategy, it shows you how strong the market is ranging or trending. When the indicator is positive (green color) the market is a range mode, when the indicator is negative (red color) it is in a trending mode. It's best used together with our Buy Sell Bands indicator to...
Buy Sell Bands is a super simple indicator based on the mean reversion (range trading) strategy that shows you exactly where to buy, sell and close trades on every chart, market and timeframe. It's best used together with our Range Strength indicator to identify when the market is in a range mode, this is the best time to take the entry signals from the Buy...
This is a more advanced version of my original mean reversion script. It employs the famous Bollinger Bands. This robot will buy when price falls below the lower Bollinger Band, and sell when price moves above the upper Bollinger Band. I've only tested it on the S&P 500, though you could try it out on other assets to see the backtest performance. During...
Count of previous bars above or below a chosen Exponential Moving Average. Typically price reconnects with well defined EMAs regularly. If the price has been above/below an EMA for too long, you can expect a reconnect in a short order and bet on mean reversion strategies.
The other way to build bands around price that uses Mean Absolute Deviation instead of Standard Deviation. MAD is also a measure of variability, but less frequently used. MAD is better for use with distributions other than the Gaussian. MAD is always less than or equal to Standard Deviation and the resulting bands are more tighter for the same parameters if we...
This indicator aims to aid in using the regular London Breakout strategy, as well as improve on it by adding a trailing stop based on the Mean Deviation Index. The London Breakout strategy (according to my personal understanding) basically sees the morning before London open as the accumulation or distribution range for large buyers or sellers, and assumes the...
The Mean Deviation Index (MDX) is used to see how much price is deviating from the mean. This indicator takes both volatility and mean deviation in consideration. It uses the standard deviation of the ATR to filter an EMA, and uses this as the mean. It then only plots > or < 0 if price is more than one x ATR away from the mean. If index is positive, the...
Mean reversion strategy, based upon the price deviation (%) from a chosen moving average (bars). Do note that the "gains" are always relative to your starting capital, so if you set a smaller starting capital (e.g. $10000) your gains will look bigger. Also when the strategy tester has finished calculating, check the "Open P/L", as there could still be open trades....
Simple arithmetic mean with source, style and width settings.
script for mean reversion conditions - tweak-able based on the volatility of the asset its used on, and the time frame
This is a continuation of my series on forecasting techniques. The idea behind the Simple Mean method is to somehow extend historical mean to the future. In this case a forecast equals to last value plus average change.
This is a mean reversion indicator that anticipates a local trend reversion. Basically, it is a channel with the mid-line serving as a moving mean baseline. Each of the two curves run up and down within this channel bouncing off from the top and bottom bounds. Touching the bounds serves as an indication of a local trend reversal. The reversal signal is stronger...
The Return to the Mean Oscillator shows the spread between the selected mean study and the actual close in price. In this first version, I'm including the All-Time Historical Mean, which is the evolution of the mean value of that asset since its inception. By using this indicator we are able to see if a particular market is trading above/below historical mean...
The Return to the Mean plots reference values that price action tends to revisit each cycle. In this first version, I'm including the All-Time Historical Mean, which is the evolution of the mean value of that asset since its inception. By using this indicator we are able to see if a particular market is trading above/below historical mean value. Moreover, we can...