#### germanburrito

##### Active member

Code:

```
declare lower;
def h = Max(high, close[1]);
def l = Min(low, close[1]);
input priceIncrement = 0.01;
def ev = volume * (close - close[1] + 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[1] then average.color("Positive and Up") else average.color("Positive and Down") else if average < average[1] then average.color("Negative and Down") else average.color("Negative and Up"));
```