runmode:0;
variable:baramount=0;
variable:barvol=0;
if barpos<=1 then exit;
if date<>date[barpos-1] then begin
baramount:=amount;
barvol:=vol;
end else begin
baramount:=baramount[barpos-1]+amount;
barvol:=barvol[barpos-1]+vol;
end
averageprice:=baramount/barvol/multiplier;
均价线:round(averageprice/mindiff)*mindiff,linethick2,coloryellow;