Use MarketXLS India's OIBuildup function to classify price and open-interest changes for an NSE futures or option contract in Excel. Request details so you can inspect the inputs behind the label.
Try it in your own spreadsheet
Get the free MarketXLS sample workbook (.xlsx).
No account needed. MarketXLS live data requires a paid plan. Preview workbook
Get MarketXLS India: plans and subscription · See the India Excel add-in
Start with this formula
After connecting the required broker in the India add-in, enter:
=MXLSIN.OIBuildup("NIFTY26NOVFUT", TRUE)
Use the example as a starting point and replace its instrument, date range or cell references with your own inputs. Historical dates in examples are sample periods; expiry-specific symbols must refer to a valid contract.
Set up the worksheet
- Open Excel and install MarketXLS India from the add-in marketplace.
- Sign in with your MarketXLS India account. For broker data, connect Zerodha or Angel One using the add-in panel. Use the broker named by a broker-specific formula.
- Enter the formula in an empty area. Leave adjacent cells clear for any table or multi-cell output.
- Confirm the instrument and settings before extending the worksheet.
Select a valid current contract rather than an underlying stock or index symbol. Enter that contract in a cell and request the detailed buildup result. Keep the contract and expiry visible because changing contracts changes the comparison.
Build the working example
The conventional labels combine price and OI direction: rising price with rising OI is long buildup; falling price with rising OI is short buildup; rising price with falling OI is short covering; falling price with falling OI is long unwinding. Treat these as descriptive categories, not proof of every participant's intentions.
Functions and syntax
These examples use the India namespace, MXLSIN.. Square brackets in a syntax line indicate optional arguments; do not type the brackets into Excel. Keep text arguments in quotation marks and use cell references when you want editable inputs.
OIBuildup
Classifies live OI buildup for a futures or option contract: Long buildup, Short buildup, Short covering, Long unwinding or Neutral.
Syntax:
MXLSIN.OIBuildup(symbol, [showDetails])
Example:
=MXLSIN.OIBuildup("NIFTY26NOVFUT", TRUE)
ZerodhaOpenInterest
Streams the live open interest for a futures or option contract from your Zerodha connection. Updates on every tick while the workbook is open.
Syntax:
MXLSIN.ZerodhaOpenInterest(symbol)
Example:
=MXLSIN.ZerodhaOpenInterest("NIFTY26NOV24000CE:IN")
AngelOneOpenInterest
Streams the live open interest for a futures or option contract from your Angel One connection. Updates on every tick while the workbook is open.
Syntax:
MXLSIN.AngelOneOpenInterest(symbol)
Example:
=MXLSIN.AngelOneOpenInterest("/NIFTY:IN23NOV26FUT")
Check the result
Do not interpret an OI change until you understand the output's comparison baseline and have valid data on both sides. An expired or illiquid contract can produce a misleading-looking worksheet if stale values are mistaken for live observations.
If Excel reports #NAME?, confirm the India add-in is loaded and the function name is spelled correctly. If a table reports #SPILL!, clear the cells in its output area. For missing broker data, check the connection in the add-in panel, verify the symbol, and test one request before expanding the sheet. Do not replace an error with zero when zero would change your analysis.
Can I use the stock symbol instead?
Use an instrument that actually has open interest, such as a supported futures or option contract. An equity cash-market quote does not provide derivatives open interest.
Get this working in your Excel
Choose a MarketXLS India subscription, install the India add-in, and follow the steps above. The pricing page lists the current subscription options; broker access requirements are separate from the spreadsheet formulas.
Use the India function library for the complete parameter reference, or contact the India team with the formula, instrument and error message if you need setup help. Never send broker passwords or access tokens.
Continue with the India Excel workflow series for related guides.

