This is another kind of average I made that's based on a similar concept of the Buy And Sell Volume Pressure indicators I've made, minus the volume. It strictly uses price data and is used as an average on the chart. If you'd like to understand how it works, please refer to the code. It's a pretty short and simple code. I have the default length of the average set to 18, but I prefer to use two of this kind of average, one with a length of 24, and one with a length of 54, at least on the SPY. Here is the code:
Below is a screenshot of the two averages I use of lengths 24 and 54 on a daily chart of the SPY:
Code:
input AvgType = averageType.EXPONENTIAL;
input AvgLength = 18;
def BuyPressure = (((high + open) / 2) + ((close + low) / 2)) / 2;
def SellPressure = (((close + high) / 2) + ((low + open) / 2)) / 2;
def Pressure = (BuyPressure + SellPressure) / 2;
def movavg = MovingAverage(AvgType, Pressure, AvgLength);
plot PressureAverage = movavg;
Below is a screenshot of the two averages I use of lengths 24 and 54 on a daily chart of the SPY: