Liquidity Weighted Moving Averages [AlgoAlpha]Description:
The Liquidity Weighted Moving Averages by AlgoAlpha is a unique approach to identifying underlying trends in the market by looking at candle bars with the highest level of liquidity. This script offers a modified version of the classical MA crossover indicator that aims to be less noisy by using liquidity to determine the true fair value of price and where it should place more emphasis on when calculating the average.
Rationale:
It is common knowledge that liquidity makes it harder for market participants to move the price of assets, using this logic, we can determine the coincident liquidity of each bar by looking at the volume divided by the distance between the opening and closing price of that bar. If there is a higher volume but the opening and closing prices are near each other, this means that there was a high level of liquidity in that bar. We then use standard deviations to filter out high spikes of liquidity and record the closing prices on those bars. An average is then applied to these recorded prices only instead of taking the average of every single bar to avoid including outliers in the data processing.
Key features:
Customizable:
Fast Length - the period of the fast-moving average
Slow Length - the period of the slow-moving average
Outlier Threshold Length - the period of the outlier processing algorithm to detect spikes in liquidity
Significant Noise reduction from outliers: