ww58
- ago
Changing reset time for VWAP indicator has no effect. This matters for futures and now the value resets at midnight, which is wrong
0
678
Solved
6 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.07% )
- ago
#1
The VWAP indicator is set up for !SecurityType.Future - so all assets except futures!
I wonder what the motivation was for that?
0
Cone8
 ( 6.07% )
- ago
#2
I think it's safe to remove that constraint. Anyone using VWAP with futures now can get the same result setting the time to the time of day of the last bar.
1
ww58
- ago
#3
It looks like it still resets at midnight, which is not quite right for futures
0
ww58
- ago
#4
Bug from last post has not been fixed
0
Cone8
 ( 6.07% )
- ago
#5
The futures constraint was removed, but the existing code only works with time-of-day, which isn't sufficient when crossing days... hence the constraint to ignore futures.

All hope isn't lost though. Since VWAP takes a BarHistory parameter, eventually we can make it work with series that trade through midnight too.
0
Cone8
 ( 6.07% )
- ago
#6
I think we've got it done for the next update -



Notes:
1. Futures (markets that trade through midnight) - the VWAPLine style will "break" only after the session close time. The "Reset Time" can be adjusted to any time of day and the calculation is reset only after that time. In the chart above, the Reset is 1600, which is the session close.

2. Stocks - the VWAPLine style will "break" only on a new day. The calculation is reset for the new day and also if the Reset Time is set for a time-of-day during market hours. So you can get a "bonus" reset for stocks.

1
Best Answer

Reply

Bookmark

Sort