Average Volume Alert

To use, display any chart, click the Study button and click the #1 button on the bottom of the study panel to add the User Study #51 to the chart.   The study will call the script and put bullets above the bars whose volume is greater then the average volume of the prior six bars.

procedure Vol;
var i: longint;
begin
  SetUser(eRepaint,true);
  SetUser(ePlot1,False);      {do not plot 1st array}
  for i:=BarBeginLeft to BarEnd do
    if Volume(i)>Average(eVolume,pred(i),6) then Bullet(i,eHigh,clRed);
end;
 
begin
  if ESPL=51 then Vol;
end;