Plot for Open Interest (OI) on multiple time scale

I wish to plot the OI (Open Interest) on multiple time scale quiet similar to volume i.e. when my display shows daily the volume / OI is for daily, when I change the display to weekly it shows the volume / OI as cumulative of that week etc...While volume is showing that functionality by default the OI doesn't show it that way.

@pushkan, my understanding of OI is that it is NOT a cumulative value.

In comparison, it is more like price than it is like volume.

I would have assumed that you would want a weekly OI to be formed the same way the weekly price chart is formed.

1 Like

A bit of variation in our case is that the vendor provides the delivered volume (Volume which is not settled intraday) as the OI field in the CASH segment. Hence the cumulative OI would be important, quiet similar to volume.

_SECTION_BEGIN("Days in Week");
WeekStart = DayOfWeek() < Ref( DayOfWeek(), -1 );
DaysInWeek = BarsSince( WeekStart )+1;

SUM1 = Sum(OI,DaysInWeek);

Plot(Sum1,"Total W Del",styleLine,colorRed);

A run through here is a chart as attached


The idea is to Plot incremental delivered each day

1 Like