在日线以下周期使用
cond:=minute<>ref( minute,1);
i:=barslast(cond)+1;
pi:=sum(c,i);
qi:=sum(vol,i);
VWAP: Pi * Qi / Qi;
公式有点问题
pi不应该是amount吧,应该是price
amount和vol是一样的
请老大再看看?
The VWAP price is calculated using the following formula:
VWAP = Sum (Pi * Qi) / Sum (Qi)
where:
VWAP = Volume Weighted Average Price
P = price of trade i
Q = quantity of trade i
i = each trade over the defined period of time, excluding cross trades
and basket cross trades.
The VWAP price is calculated to 3 decimal places.
用收盘价改好了
是自定义的指标线。可以在软件中新建公式,再把一楼的代码复制到公式中,双击公式加载到图表即可。