I'm writing a code which calculates the average volume over a 200 day period multiplied by the average close price over the same period. In the chart, I'm using the dividend adjusted price (this is required for other indicators I'm also running), but I want the close price in the average volume script to be the actual close, so that it accurately represents the dollar amount of trading. The script defaults to whatever the chart is set to.
Anybody know how I might use the unadjusted close in the script, while keeping the chart on the adjusted close?
Here's the code: Code
Also, here's a screenshot of the code running on a dividend adjusted chart. (See the blue 'ADJ' in bottom right corner). As you can see, the value of the script on June 17, 1997 is 103,367. This however is using the adjusted close.Screenshot of code on adjusted chart
Here's the code running on an unadjusted chart. This is the value I want, as it reflects the actual close price at the time. This time the value on June 17, 1997 is 278,054. Screenshot of code on unadjusted chart