Implement a Volume Wieghted Average Price is not a difficult thing on pathfinder,
take a look to the formula:
46bad117567e483aade6089e9cdad0ca.png
as you know any variable on pathfinder become a vector so it keep trace of previous values,
this is the key that make simple this kind of implementations with pathscript, the above formula can be written as follow:
SET INSTVWAP = (OPEN * VOLUME) / VOLUME
SET VWAP = SMA(INSTVWAP, 20)
An ready to use indicator is attached for download.
VWap Image.jpg
Important Disclaimer: The code or software herein contained or attached, including but not limited to Custom indicators, PathScript, Expert Advisors, EAs, and any other Scripts (“Software”), are provided "As Is" and are intended to be used for informational and educational purposes only. The Software is provided by FastBrokers and/or its employees or affiliates (“FastBrokers”) as a courtesy service to its customers and it is intended for informational and educational purposes only and under no circumstances should be regarded as investment advice or as a solicitation or an offer to sell/buy any financial product. FastBrokers assumes no responsibility or liability from gains or losses incurred by the performance of the Software provided. No representation is being made that any account will or is likely to achieve any particular profits or losses. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular Software. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. The Software cannot be guaranteed to be error-free, thus may cause unforeseeable results. By using the Software provided by FastBrokers, End User assumes full responsibility for verifying the validity of the Software, and End User accepts full responsibilities for its actions, trades, profit or loss, and End User agrees to hold FastBrokers harmless in any and all ways. If you do not agree with this statement you must remove the Software from your computer.
All trademarks are the property of the respective owners of each piece of Software, where stated.


Reply With Quote
