【vwapResettable】
[code]input:PriceValue(NumericSeries),
LocalHrsOffset(NumericSimple),
time1(NumericSimple),
time2(NumericSimple),
time3(NumericSimple),
time4(NumericSimple),
time5(NumericSimple);
vars:
var0(0),
var1(0),
var2(0),
var3(0);
var3 = MinutesToTime(TimeToMinutes(time)+LocalHrsOffset*60);
if date<>date[1]
or var3=time1
or var3=time2
or var3=time3
or var3=time4
or var3=time5 then begin
var0 = 0;
var1 = 0;
end;
var0 = var0 + (PriceValue * Ticks);
var1 = var1 + Ticks;
if var1 > 0 then
var2 = var0 / var1
else
var2 = PriceValue;
VWAPResettable = var2;
[/code]
页:
[1]