Hi!
I want to use VWAP in a strat on DAX30 but since DAX30 does not give any volume at certain times i get a division by zero error and the start stops from pro order.
So i wonder if someone can help me with only calling the vwap indicator for example between 03.00-22.00, is that possible?
d = max(1, intradaybarindex)
VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
if(intradaybarindex=0) then
endif
if vwap>vwap[1] then
color = 1
else
color = -1
endif
RETURN VWAP coloured by color STYLE(LINE,2) as "VWAP"
Yes, in the CALLing strategy use:
IF Time >= 030000 AND Time <= 220000 THEN
MyVWAP = CALL Vwap
ENDIF
you can use OpenTime, instead of Time, as it best suits your needs.
I wrote “CALL Vwap” assuming the name is VWAP, but it can be any name.