How squaring off works
| Open position | Square off by |
|---|---|
| Bought shares intraday | Selling the same quantity the same day |
| Short sold shares intraday | Buying back the same quantity the same day |
| Long futures or options | Selling the same contract and quantity |
| Short futures or options | Buying back the same contract and quantity |
The square-off has to match the open position exactly: the same stock or contract, the same expiry and strike for options, and the same product. Selling a 25,000 call of a different expiry does not close a position; it opens a second one, with its own margin and its own risk.
A worked example on Nifty options
You buy 2 lots of the Nifty 25,000 call at ₹280.50, 130 units. Later in the day the call trades at ₹320.00 and you sell 2 lots of the same call.
| Item | Amount |
|---|---|
| Bought | 130 × ₹280.50 = ₹36,465 |
| Sold | 130 × ₹320.00 = ₹41,600 |
| Profit before charges | ₹5,135 |
The position is now flat. Had the call fallen to ₹250 instead, the same square-off would have booked a loss of (250 − 280.50) × 130 = −₹3,965.
Squaring off part of a position
A position can be closed in parts. You are long 4 lots of Nifty futures at 25,000. Nifty reaches 25,080 and you square off 2 lots, booking 80 points × 130 units = ₹10,400. The other 2 lots stay open with their original entry price, and their result depends on where you close them. In F&O a part square-off must be in whole lots. On a futures round trip, charges come to about ₹966 to ₹972 a lot, so the booked figure above falls by roughly ₹1,950 after charges on the two lots.
Auto square-off
Positions taken in an intraday product must be closed the same day. If you do not close them, the broker squares them off shortly before the close.
- The cut-off time is set by each broker, usually in the last 15 to 20 minutes of the equity session, and before the close for commodities.
- A fee is charged by many brokers for each position they close this way, plus GST.
- The broker uses a market order, which can fill at a poor price in a fast or thin market.
Brokers may also square off positions during the day if margin falls short, and before expiry for in-the-money stock derivatives that would otherwise need physical settlement.
Squaring off against letting a contract expire
An option or future can be squared off at any time before expiry, or held to it. At expiry, index derivatives settle in cash at the index's closing value; stock derivatives settle by delivery of shares. Squaring off before expiry avoids delivery, avoids STT on the full exercise value of stock options, and keeps any time value an option still has.
| Choice | What you get |
|---|---|
| Square off before expiry | The market price, including any time value left |
| Hold an index option to expiry | Its intrinsic value at the close, in cash |
| Hold a stock option or future to expiry | Delivery of shares, or the duty to deliver them |
Squaring off multi-leg positions
For spreads, iron condors and other multi-leg strategies, square off the sold legs first, or all legs together. Closing the bought hedge first leaves a naked short position, with higher margin and unlimited risk, even if only for a moment. The margin benefit of a hedged position is explained in hedge margin benefit.
An iron condor on Nifty, for example, is closed in this order: buy back the short call and the short put, then sell the long call and the long put. If the market is moving fast, closing all four in one basket is safer than closing them one by one.
Squaring off in a fast market
The square-off order itself has to fill. In a liquid Nifty option a market order usually fills within a tick or two of the quote. In a thin stock option, or in the last minutes before expiry, it can fill far away. A limit order close to the current price, moved if it does not fill, keeps more control over the exit. Some traders place the square-off as a stop-loss order when they enter, so the exit is already waiting at the exchange if the market turns.
What squaring off releases
When a position is squared off, the margin it blocked is released, and the booked profit or loss is added to or taken from the account's funds for the day. On a hedged strategy, squaring off one leg can raise the margin on the rest: a short call that was hedged by a bought call needs the full margin of a naked short once the hedge is gone. Intraday positions release their margin as soon as they are closed; positions carried overnight keep it blocked until the square-off, and their MTM is settled in cash each day until then.
Common mistakes
- Waiting for the broker's auto square-off. It costs a fee and fills at the market, often at the worst moment of the day.
- Squaring off the wrong contract. A sale in the next expiry, or in a different product, leaves the original position open.
- Closing the hedge first on a spread, which turns a limited-risk trade into an unlimited one.
- Forgetting overnight positions. A position taken in an overnight product stays open until you close it or it expires.
A short history
"Square" has meant even or settled in English since the 1500s, and squaring accounts meant settling what was owed. Indian markets used the phrase for closing a trade in the days of the trading ring and the badla system, when positions in the cash market could be carried forward from one settlement to the next. After rolling settlement replaced the old account periods in 2001 and 2002, squaring off came to mean above all the same-day close of an intraday trade.1 SEBI's peak margin rules, phased in from December 2020 to September 2021, cut the extra leverage brokers could give on intraday positions, which changed how much traders could take on before the auto square-off.2
Square-off in QuantPower
- A square-off is never blocked. The order path's risk checks, the ban list, the daily loss limit and the maximum orders a day, stop new entries, but an order that closes a position always goes through.3
- Exit all stops running algos first and then squares off every position. It needs the tap and the second factor.
- Smart Exit sets a profit target, a stop-loss and a trailing step for the whole account. On a hit it stops the algos and squares off. Arming it needs the tap and the second factor.
- Algos close by their own rules: a leg's target or stop-loss in points, per cent or a Greek, an exit time each day, or a next-day exit (BTST or STBT).
- The kill switch stops trading in a segment until its next session and places no order itself, so open positions there should be squared off first.
Related terms
- MTM meaning: the running profit or loss on an open position
- Margin meaning: what an open position blocks until it is squared off
- Expiry meaning: the last day a contract can be squared off
- Short selling meaning: a position that is squared off by buying
Frequently asked questions
What does square off mean in the share market?
Closing an open position with an opposite trade of the same quantity, such as selling shares you bought earlier that day.
What time is auto square-off?
It is set by your broker, usually in the last 15 to 20 minutes of the session. Check your broker's timings for equity, F&O and commodities separately.
Is there a charge for auto square-off?
Many brokers charge a fixed fee plus GST for each position they square off. Closing the position yourself avoids it.
Can I square off a position the broker has blocked?
Yes. Closing orders are allowed even when new orders are not, for example in a stock in the F&O ban or after a daily loss limit is reached.
References
- SEBI, rolling settlement for all scrips from 2001 and the end of carry-forward trading (sebi.gov.in)
- SEBI, circulars on the collection of peak margin, phased from December 2020 to September 2021 (sebi.gov.in)
- QuantPower: order path, risk checks and account controls, from the app's product notes, checked 12 November 2026