0

I have this code:

https://pastebin.com/n9QHrHN7

What should he do?: This code should only draw the VWAP indicator for me, which it does!

what is the problem?: The VWAP indicator is there but I want to use it on a daily basis. This means that the VWAP should always be regenerated at the opening. So far it looks like this: https://prnt.sc/7mK_6cfvumSQ (Pink = VWAP)

So in this example you can clearly see that the VWAP is not session-based but considers everything as a session, which it should not do

Can someone help me please

I tried to build the whole switch principle by using the code, for example: `def next(self): if self.data.datetime.date(0) != self.data.datetime.date(-1): self._vwap_period = 1

self.l.typprice[0] = ((self.data.close + self.data.high + self.data.low)/3) * self.data.volume`

paste in the class "vwap" but unfortunately that doesn't lead to the result I want. I've also tried to do the whole thing with static times, which doesn't work either

0 Answers0