system
(system)
1
Hi,
Currently the AVWAP begins on the anchor day, but is continuous to the last trading day.
How would the script be written if I wanted to show the Anchored VWAP (AVWAP) as a Show Plot for a specific time period on a chart?
E.g., I want to anchor the VWAP on 4/1/2020, but I want it to end on the last day of the previous quarter, or 6/30/2020.
Thanks!
-Paul
OPMV2012
(Mathew Verdouw, CMT, CFTe)
2
Hi Paul,
Have a look at this post on how Matt Humphreys creates a date range. https://forum.optuma.com/topic/creating-a-date-range-region-with-script/
You would need to an if command on the AVWAP value once you get the range.
eg
AVWAP1 = {your avwap value};
DR1 = {Date range value - from the post};
if(DR1 == 1, AVWAP1, 0) // note no semi colon as this is the output command