OI on Weekly plots the Last bar value instead of Summation of the week

If I change Volume from daily to weekly, I observed that the weekly Volume is an addition of the 5 days value.
e.g.: Volumes for a week
Weekly Volume as per the AMIBROKER Indicator = 17088

Now in my data i have another column (OI). I used the same code as Volume to plot this indicator (replacing Volume with OI). But when I change from Daily to Weekly it plots the value of the last bar of the week. I want it to plot the sum of the OI value for the week. I think the same should happen if i change to Monthly.
e.g.: OI for a week
Weekly OI Value: 1215. But I want it to plot the sum 6478 instead.

Can anyone help me on this?

Below is the code i used for OI Indicator:
Plot( OI, _DEFAULT_NAME(), IIf( C > O, ParamColor("Up Color", colorGreen ), ParamColor("Down Color", colorRed ) ), ParamStyle( "Style", styleHistogram | styleThick, maskHistogram ) );


Hello Ravi,

You may want to study the discussion in a related topic about Volume & OpenInterest

We have to understand that Volume is an Aggregate for a Period of Time; where as OpenInterest is a SnapShot at a Point of Time

With Regards

Sanjiv Bansal

1 Like

@Sumangalam Thanks, the topic you shared solved my problem. I was referring to Delivery Volume which i was using in the OI field.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.