Use MarketXLS India to calculate Supertrend in Excel from connected broker candles. The function returns the indicator value and its direction, so you can display both beside your watchlist.
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.SuperTrend("BANKNIFTY", "15m", 10, 3)
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.
Enter the symbol, candle interval, period and multiplier. Leave space for both output cells. Label the two results as Supertrend value and direction; a direction of +1 means up and -1 means down in this function's output.
Build the working example
Start with a single instrument and inspect its candle table alongside the indicator. When you change the timeframe or multiplier, keep a note of the settings. Copy the formula down only after confirming that the first row is using the intended symbol and interval.
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.
SuperTrend
SuperTrend on live broker candles. Blank output spills the SuperTrend value and direction (+1 up, -1 down).
Syntax:
MXLSIN.SuperTrend(symbol, [interval], [period], [multiplier], [output], [mode], [broker])
Example:
=MXLSIN.SuperTrend("BANKNIFTY", "15m", 10, 3)
Candles
Spills the last N candles (Date, Open, High, Low, Close, Volume, OI) from your connected broker and keeps them updating.
Syntax:
MXLSIN.Candles(symbol, [interval], [bars], [mode], [broker])
Example:
=MXLSIN.Candles("INFY", "15m", 50)
Check the result
Supertrend can alternate direction during choppy markets. A changing direction is not evidence of a profitable strategy. Live calculations and calculations based only on completed candles can also differ near a candle boundary.
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 Supertrend for Bank Nifty?
The function catalog includes a Bank Nifty example. Use the symbol supported by your connected broker and keep the indicator timeframe visible in the worksheet.
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.

