Thanks again. I've been trying to reproduce it. The following plots something quite interesting, but different to MT version.
b = Param("b",100,1,1000,1); // number of bars to perform calcs on
EMAVol = EMA(Volume,b); // EMA of volume based on 'b' bars of data
emamax = HHV(EMAVol ,b); // highest value of EMA volume in last 'b' bars
average = Sum(Volume,b)/b; //average volume in last 'b' bars
mx = HHV(Volume,b); // highest value of volume over the last 'b' bars. Using variable 'mx' instead of 'max'.
croppedVol= max(emamax,Min(average *6, mx * 1.02) ) ;
Plot( croppedVol, "",colorGreen, styleHistogram);