Portland, Oregon
Experience: Intermediate
Platform: F-16CM-40
Trading: GBU-39
Posts: 6,191 since Sep 2013
Thanks Given: 10,459
Thanks Received: 12,695
|
Just found this easy code and was able to make it work in OEC.
Inputs:Time_Start(0000);
vars:
PriceW(0),
ShareW(0),
bb(0),
vwap(0);
if date > date[1] then begin
PriceW = 0;
ShareW = 0;
end;
value1= (open+high+low+close)/4;
bb=volume;
if time > time_start then begin
PriceW = pricew + value1*bb;
ShareW = ShareW + bb;
vwap = PriceW / ShareW;
end;
Plot1(vwap);
|