How to add commulative open intrest of a sector stocks

hi i am new to amiboker afl . i am trying to add open intrest of all stocks sector wise. so we get clear view of sector wise oi buildup. but i am stuck . i dont know how to get value of all three contract oi. so need little help to get those value . my code is

`OI_I = Foreign( Name()+"-I", "I"); // first month future contract
OI_II = Foreign( Name()+"-II", "I");// second month future contract
OI_III = Foreign( Name()+"-III", "I");// third month future contract
OI_cum = OI_I + OI_II + OI_III;

N=Param("Smoother",5, 1, 100, 1 );

BANKoi = ParamToggle("BANKoi","Off|On",0);
SO1 = Foreign( "CANBK", "OpenInt" ) ;
c1=Ref(OI_cum,1);
SO2 = Foreign( "BANDHANBNK", "OpenInt" ) ;
c2=Ref(OI_cum,1);
SO3 = Foreign( "SBIN", "OpenInt" ) ;
c3=Ref(OI_cum,1);
SO4 = Foreign( "BANKBARODA", "OpenInt" ) ;
c4=Ref(OI_cum,1);
SO5 = Foreign( "AXISBANK", "OpenInt" ) ;
c5=Ref(OI_cum,1);
SO6 = Foreign( "PNB", "OpenInt" ) ;
c6=Ref(OI_cum,1);
SO7 = Foreign( "INDUSINDBK", "OpenInt" ) ;
c7=Ref(OI_cum,1);
SO8 = Foreign( "ICICIBANK", "OpenInt" ) ;
c8=Ref(OI_cum,1);
SO9 = Foreign( "FEDERALBNK", "OpenInt" ) ;
c9=Ref(OI_cum,1);
SO10= Foreign( "KOTAKBANK", "OpenInt" ) ;
c10=Ref(OI_cum,1);
SO11= Foreign( "HDFCBANK", "OpenInt" ) ;
c11=Ref(OI_cum,1);
AvgBankOI = (SO1+SO2+SO3+SO4+SO5+SO6+SO7+SO8+SO9+SO10+SO11)/11;Bankoismoother=MA(AvgBankOI,N);
if(BANKoi==1)
Plot(Bankoismoother,"Bankdel", ParamColor( "BankdelColor", colorGrey40 ), ParamStyle("Bank Style", styleLine|styleNoLabel|styleThick|styleOwnScale, mask = maskAll) );

BANKcoi = ParamToggle("BANKcoi","Off|On",0);
BANKcoi = (c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+c11)/11;Bankcoismoother=MA(BANKcoi,N);
if(BANKoi==1)

Plot(Bankcoismoother,"Bankcoi", ParamColor( "BankcoiColor", colorGreen), ParamStyle("Bank Style", styleLine|styleNoLabel|styleThick|styleOwnScale, mask = maskAll) );

`

@jain202,

For posting questions on the forum, you are required to get "Verified".

Please SEARCH for "Verified" or "Verified Badge" and follow the steps.

Also see,