Hi,
Is VWMA introduced in latest pi release calculated based on the bullish/bearish candle & their corresponding volume similar to OBV ? or based on the VWAP values from NSE? I would like to use VWMA into my tradescript codes is that possible? curently tradescrpit supports WMA only .Is there any workaround to write a code for crossover of 10 period & 25 period VWMA using tradescript?
–
Thanks
Yes, in new release of pi Volume weighted moving average is available under study volume in charts
check the below screenshot

hElLO tRaDeR,
The VWMA is not defined as a function in the Tradescript Manual.
You can manually write a code for it, BUT will be a lengthy one, with the following eg:
Formula for 3 VWMA: (C1*V1 + C2*V2 + C3*V3) / (V1+ V2+ V3)
TRADESCRIPT:
((CLOSE * VOLUME) + (REF(CLOSE,1) * REF(VOLUME,1)) + (REF(CLOSE,2) * REF(VOLUME,2))) / (VOLUME + REF(VOLUME,1) + REF(VOLUME,2))
1 Like
Thanks for the reply Algogeek, I am already using it in charts ,I have asked for trade script code for VWMA crossover .