Foreign function with Norgate VWAP data

I want to know if anyone has had success in using the foreign function with VWAP data constructed from Norgate data AUX1 and volume?
Here is the experimental code I have, but it plots the normal close price not the VWAP.

GDX = Foreign("GDX","Aux1/V");
Plot( GDX, "GDX", Colorblack, styleDots); 

Thank you for any advice.

It is not correct that way. You need two times Foreign or just use SetForeign.

SetForeign("GDX");
GDX = Aux1/V;
RestorePriceArrays();
Plot( GDX, "GDX", Colorblack, styleDots);
2 Likes

Thank you for showing me the correct code.