# afl on oboi (on balance open interest)

#### xsis

##### Active Member

since, i dunno programming well, can any1 help me getting afl for on-balance open interest (OBOI). its same as that of on-balance volume (OBV).

the logic for OBOI is roughly like this (ignore the below logic if i am technically wrong!)

SUM{OI+, Period} - SUM{OI-, Period}

where OI+ is the open interest on up days (close higher than previous close) and vice versa!

thks guys

#### mastermind007

##### Well-Known Member

since, i dunno programming well, can any1 help me getting afl for on-balance open interest (OBOI). its same as that of on-balance volume (OBV).

the logic for OBOI is roughly like this (ignore the below logic if i am technically wrong!)

SUM{OI+, Period} - SUM{OI-, Period}

where OI+ is the open interest on up days (close higher than previous close) and vice versa!

thks guys
Code:
``````OMinus = IIf(Ref(C,-1) > C, OpenInt, 0);
OPlus = IIf(Ref(C,-1) < C, OpenInt, 0);
Plot(Sum(OPlus, 14) - Sum(OMinus, 14), "OB", colorBlack, styleLine | styleOwnScale);``````
What is use of this?

#### Happy_Singh

##### Happy
Hello

Its conceptually wrong, OI and Vol are two different things

Volume starts from ZERO and is counted to XXXXX (day/bar volume)
OI is cumulative it starts at previous days value is added/reduced days activity to get today's final result

try using OI delta i.e. the difference/change in OI that happened today to built any sort of indicator

Happy

#### mastermind007

##### Well-Known Member
Hello

Its conceptually wrong, OI and Vol are two different things

Volume starts from ZERO and is counted to XXXXX (day/bar volume)
OI is cumulative it starts at previous days value is added/reduced days activity to get today's final result

try using OI delta i.e. the difference/change in OI that happened today to built any sort of indicator

Happy
Thats precisely what I was thinking !!! ...

#### xsis

##### Active Member
will get bak 2u...thks

Last edited:

#### mastermind007

##### Well-Known Member
xsis

How should I know? You wanted them combined so I gave you AFL to combine 'em. Just because 2 numbers exist, you cannot always add 'em up. As Happy pointed out Volume starts at zero each day whereas OI does not.

#### Happy_Singh

##### Happy
Hello

We can look at OI as accumulated volume for a specific series, for options traders the change in OI is an excellent tool, but they anyway track it.
It could also be used to define S/R, but the SP on options in NSE are 100 points apart, so makes better sense to use Volume at Price (MP) to define the S/R

Happy