How to Calculate VWAP for Daily and Hourly base

  chart_d = tsl.get_historical_data('KALYANKJIL','NSE','DAY')
        if chart_d is  None or  chart_d.empty:
            return None

        chart_d["d_vwap"] = ((chart_d["high"] + chart_d["low"] + chart_d["close"]) / 3 * chart_d["volume"]).cumsum() / chart_d["volume"].cumsum()
        print(f'chart_d {chart_d}')

Using Code base : 568.86724
Dhan TV : 524.72

Any suggestion… How to get correct VWAP for daily?

@Tradehull_Imran

Hi @Sapanaben_Patel ,

The VWAP calculation seems to be right, but the numbers days to be considered must be sliced, checked. and only those number of days must be passed for calculation.