In case anyone is interested, I made a rough estimate of Pascal Willain's Effective Volume function (from this book). you can download the book and how it works here its https://b-ok.cc/book/720566/248b4b page 32. The book starts by outlining the formula, then it explains that not all volume is useful, only about 25 percent of volume could be used to gauged the overall sentiment of where the stock might go. The issue with this indicator is that is a rough estimate of where the big players and the small payers could lie within the formula, I have the small players turned off, I only have the average turned on, I found that on the 20 day 4 hour it outlines where there might be a turn in the stock or where the sentiment according to volume might change. I don't think the indicator is done, if anyone has a better way to average the small players and large players it would be of great help. The way I use this is sometimes there's is divergences in volume and direction of price. Mind you the way I am using this indicator is my take on it so you are subject to my ideas unless you read the book, or if you have some ideas to make this indicator better, I am still backtesting it. In case you're wondering the indicator ignores the first bar of trading, the book outlines why this is the case. No where in the book does the indicator say that you should average effective volume.
, but this is what im doing so there that....
declare lower; def h = Max(high, close); def l = Min(low, close); input priceIncrement = 0.01; def ev = volume * (close - close + priceIncrement) / (h - l + priceIncrement); # version without opening noise def ev2 = if(secondsFromTime(930)>600,ev,0); def EffectiveVolume = ev2; #plot elapsedtime = secondsFromTime(930); def ev_mag_avg = Average(data = AbsValue(ev2), length = 144); #def small_ev = if(AbsValue(ev2) < ev_mag_avg, ev2, 0); def large_ev = if(AbsValue(ev2) >= ev_mag_avg, ev2, 0); #plot SmallEffectiveVolume = small_ev; plot LargeEffectiveVolume = large_ev; #plot SmallEffectiveVolumeAvg = Average(data = small_ev, length = 33); #plot LargeEffectiveVolumeAvg = Average(data = large_ev, length = 33); plot average = average(largeEffectiveVolume); plot zeroline = 0; largeEffectiveVolume.hide(); average.SetDefaultColor(GetColor(5)); average.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); average.SetLineWeight(3); average.DefineColor("Positive and Up", Color.GREEN); average.DefineColor("Positive and Down", Color.yellow); average.DefineColor("Negative and Down", Color.RED); average.DefineColor("Negative and Up", Color.yellow); average.AssignValueColor(if average >= 0 then if average > average then average.color("Positive and Up") else average.color("Positive and Down") else if average < average then average.color("Negative and Down") else average.color("Negative and Up"));