KERPD Noise Filter - Kaufman Efficiency Ratio and Price DensityThis indicator combines Kaufman Efficiency Ratio (KER) and Price Density theories to create a unique market noise filter that is 'right on time' compared to using KER or Price Density alone. All data is normalized and merged into a single output. Additionally, this indicator provides the ability to consider background noise and background noise buoyancy to allow dynamic observation of noise level and asset specific calibration of the indicator (if desired).
The basic theory surrounding usage is that: higher values = lower noise, while lower values = higher noise in market.
Notes: NON-DIRECTIONAL Kaufman Efficiency Ratio used. Threshold period of 30 to 40 applies to Kaufman Efficiency Ratio systems if standard length of 20 is applied; maintained despite incorporation of Price Density normalized data.
TRADING USES:
-Trend strategies, mean reversion/reversal/contrarian strategies, and identification/avoidance of ranging market conditions.
-Trend strategy where KERPD is above a certain value; generally a trend is forming/continuing as noise levels fall in the market.
-Mean reversion/reversal/contrarian strategies when KERPD exits a trending condition and falls below a certain value (additional signal confluence confirming for a strong reversal in price required); generally a reversal is forming as noise levels increase in the market.
-A filter to screen out ranging/choppy conditions where breakouts are frequently fake-outs and or price fails to move significantly; noise level is high, in addition to the background buoyancy level.
-In an adaptive trading systems to assist in determining whether to apply a trend following algorithm or a mean reversion algorithm.
THEORY / THOUGHT SPACE:
The market is a jungle. When apex predators are present it often goes quiet (institutions moving price), when absent the jungle is loud.
There is always background noise that scales with the anticipation of the silence, which has features of buoyancy that act to calibrate the beginning of the silence and return to background noise conditions.
Trend traders hunt in low noise conditions. Reversion traders hunt in the onset of low noise into static conditions. Ranges can be avoided during high noise and buoyant background noise conditions.
Distance between the noise line and background noise can help inform decision making.
CALIBRATION:
- Set the Noise Threshold % color change line so that the color cut off is where your trend/reversion should begin.
- Set the Background Noise Buoyancy Calibration Decimal % to match the beginning/end of the color change Noise Threshold % line. Match the Background Noise Baseline Decimal %' to the number set for buoyancy.
- Additionally, create your own custom settings; 33/34 and 50 length also provides interesting results.
- A color change tape option can be enabled by un-commenting the lines at the bottom of this script.
Market Usage:
Stock, Crypto, Forex, and Others
Excellent for: NDQ, J225, US30, SPX
Market Conditions:
Trend, Reversal, Ranging
Efficiency
Price Density (Market Noise) by Alejandro PThis is an indicator based on the Price Density concept. Price Density is a quantifiable method of measuring market noise for a certain period of candles.
This indicator also has the option to use relative percentile values which transforms the indicator from an absolute value measure to a percentile based measure so it can be more easily compared across vastly different assets.
We can use Price Density to set rules and only trade particular systems when noise is at an appropriate level. For example, if noise is high then we would want to avoid trend following strategies and instead trade mean-reversion strategies, and vice-versa when the opposite is true. Price Density can also be used to match assets to strategies. Some assets will be naturally more noisy than others and therefore we might have a principle where we only trade those noisy assets with our mean reversion strategies and the more quiet assets with trend following strategies.
Price Density can be used by looking at indicator and seeing how efficiently the indicator line moves from one side to the other. Is it in a straight line? Or are there lots of zigs and zags? The straighter the line, the less market noise there is.
Calculations:
Price Density = Sum(ATR(1), Length) / (Max(High) - Min(Low))
The numerator on top looks at the high of each of the bars, the low of a bar, calculates the difference and then sums up all of those values for the time period. This gives us an idea of the fluctuation of the individual price moves. Next, the denominator uses the maximum value from all of the highs of those bars and subtracts the minimum low out of all of the bars. This gives us the range or the height of the box and so if there's a lot of price fluctuation compared to the actual range this means we'll have a high value which gives the indication that we have high levels of noise. If however those individual fluctuations are small compared to the range this means we'll get a low value for the price density and therefore have low levels of noise.
Bryant Adaptive Moving Average@ChartArt got my attention to this idea.
This type of moving average was originally developed by Michael R. Bryant (Adaptrade Software newsletter, April 2014). Mr. Bryant suggested a new approach, so called Variable Efficiency Ratio (VER), to obtain adaptive behaviour for the moving average. This approach is based on Perry Kaufman' idea with Efficiency Ratio (ER) which was used by Mr. Kaufman to create KAMA.
As result Mr. Bryant got a moving average with adaptive lookback period. This moving average has 3 parameters:
Initial lookback
Trend Parameter
Maximum lookback
The 2nd parameter, Trend Parameter can take any positive or negative value and determines whether the lookback length will increase or decrease with increasing ER.
Changing Trend Parameter we can obtain KAMA' behaviour
To learn more see www.adaptrade.com
Efficient Auto LineMore Efficiency
Based on the Auto-Line code, the Efficient Auto Line aim to provide a more controlled adaptivity of the indicator. The first indicator of this sort worked this way : when the absolute difference between the price and the indicator is higher than the previous indicator +/- A pips of amplitude, the indicator will display the closing price, else its anterior value. The second indicator (Auto-Line) was adaptive and used the standard deviation instead of a constant A . This indicator will run both methodology providing both a trend strength indicator (Efficiency Ratio) parameter and two constant parameter.
Parameters
The length parameter will control the period of the efficiency ratio, a high period return lower values of the efficiency ratio. Since its an indicator in a range of (0,1) we use it to make our indicator more adaptive in trending market, this is when we need our two constant parameters, the fast/slow parameter can be any amount of pips where fast < slow , when the price is trending (efficiency ratio close to 1) the indicator will use the fast parameter, if its ranging (efficiency ratio away from 1) the indicator will use the slow parameter, then it will work like the first methodology previously explained. So the fast parameter should be equal to a small movement of pips (0.0001 or 1 pip) and the slow parameter should be equal to a number of pips you wont expect to see in a ranging market. At this point it is good to test for both parameter and see which values work better (a more automatic process is in development) .
Hope you like it !
Efficient PriceTrading The Movements That Matters
Inspired by the Price Volume Trend indicator the Efficient Price aim to create a better version of the price containing only the information a trend trader must need.
Calculation
This indicator use the Efficiency Ratio as a smoothing constant, it is calculated as follow :
ER = abs(change(close,length))/sum(abs(change(close)),length)
The goal of the Efficiency Ratio is to show if the market is trending or ranging.If ER is high then the market is considered to be trending, if ER is low then the market is considered to be ranging.
Then the Efficient Price is calculated :
EP = cum(change(close)*ER)
When the price is trending, the indicator will show movements of the price with unchanged volatility, but if the price is not trending then the indicator will flatten those movements.Think of this indicator as both a filter and a compressor and the Efficient Price as some kind of threshold.
The Efficient Price As Input For Indicators/Strategies
If the indicator show the movement of the trending price, it can be interesting to use it as input in order to reduce the number of false signals in a strategy.
We will test 2 MACD strategy provided by tradingview, one using the closing price (In Red) and one with the efficient price (In White) as input
with both the following parameters :
fastLength = 50
slowlength = 200
MACDLength = 20
length = 50
Where length is the parameter of the Efficient Price.A spread of 2 pips is used.
Without Efficient Price : 26.88% of profitability, 69 pips of profit.
With Efficient Price : 38.46% of profitability, 336 pips of profit.
The difference of profitability is of 11.58%, the strategy with the Efficient Price made few trades and its equity have a lower variance than the equity of the MACD strategy using closing price.
Smoothed Version
It is possible to smooth the indicator output by using the following code :
EP = cum(change(close,length)*ER)
Hope you enjoy
For any questions/demands feel free to pm me, i would be happy to help you
PFE (Polarized Fractal Efficiency) The Polarized Fractal Efficiency (PFE) indicator measures the efficiency
of price movements by drawing on concepts from fractal geometry and chaos
theory. The more linear and efficient the price movement, the shorter the
distance the prices must travel between two points and thus the more efficient
the price movement.
FREE INDICATOR: POLARIZED FRACTAL EFFICIENCYLooking for something other than a moving average to help determine not only a trend's strength, but also it's direction? Try PFE!
PFE was developed by Hans Hannula that was invented to determine price efficiency over a user-defined time period.
The Polarized Fractal Efficiency indicator is, in the essence, an exponentially smoothed ratio of the length of two lines: (1) of a straight line between today’s close and the close Period days ago, and (2) of a broken line connecting all Close points between today and Period days ago. The indicator output varies between -100 and 100. The theory behind this indicator is that if it is >50 (or <-50) then the market is likely to reverse its trend from positive to negative (or from negative to positive).
Other usage:
Securities with a PFE greater than zero are deemed to be trending up, while a reading of less than zero indicates the trend is down. The strengh of the trend is measured by the position of the PFE relative to the zero line. As a general rule, the further the PFE value is away from zero, the stronger and more efficient the given trend is. A PFE value that fluctuates around the zero line could indicate that the supply and demand for the security are in balance and price may trade sideways.
As with all indicators, finding something that works well along side this would be the most beneficial way to use it.
Perhaps something like the Choppiness Index (related idea below) could do the trick.
Grab the source code here: pastebin.com
Installation video by @ChrisMoody here : blog.tradingview.com