How Does Square Off Work for Closing Positions From This Automation or Across the Account?
The square off action in Automate is used to exit open positions when an automation reaches a specific trigger, condition, or exit path. Depending on the selected action type, it can close only positions created by the current automation or positions across the entire account.
This action directly places exit orders for live positions.
How does Square off work?
When a square off action node is executed:
- Exit orders are placed for the applicable open positions.
- Only positions that are currently open are considered.
- The scope of positions exited depends on the selected square off action type.
- The automation continues to the next connected node after the square off attempt.
Types of square off action
FYERS Automate provides multiple square off action types, allowing you to control exactly which positions are exited.
1) Square off automation positions
- Exits only the positions opened by the current automation.
- Positions from other automations or manual trades are not affected.
2) Square off all positions
- Exits all open positions across the account, across all segments.
- Includes automation positions and manually placed positions.
3) Square off positions by segment
4) Square off all options positions
- Exits all open positions in the options segment.
5) Square off all NSE options positions
- Exits all open options positions in NSE only.
6) Square off all commodity positions
- Exits all open positions in the commodity segment.
7) Square off all intraday positions
- Exits all open intraday positions across segments.
Steps to use square off action in Automate
Follow these steps when building a new automation from scratch.
- Log in to FYERS Web and go to Automate → Dashboard.
- Click Create automation.
- In the workflow canvas, add the required start, trigger, or condition nodes.
- In the left panel, open the Actions tab.
- Expand Square off.
- Click the required Square off action to add it to the canvas.
- Click the Square off node to open Edit node configuration.
- Select the required Action type.
- If applicable, select the segments and product types.
- Click Apply to save the configuration.
- Click Validate to ensure the automation has no errors.
- After successful validation, click Run now or schedule the automation.
Use square off automation positions to ensure only trades created by the current automation are exited.
Last updated: 22 Dec 2025
Related Articles
What happens if I manually square off positions created by an automation?
When you manually square off a position that was opened by an Automate workflow, it immediately affects the run. Here’s exactly what happens and how to manage exits safely. Explanation Manually squaring off any position opened by that automation ...
What Does Stop Automation Do, and When Should I Choose “Stop Only” vs “Stop and Square Off”?
The stop automation action in Automate is used to immediately halt a running automation when it reaches a defined trigger, condition, or exit path. Depending on the option selected, it can stop just the automation logic or stop the automation and ...
What does the “Check only for this automation” checkbox mean?
The checkbox Check only for this automation decides what positions are checked. Turn it ON to check only the trades made by this automation. Turn it OFF to check the scheduled automations to be run in the future. What it does ON (checked): Uses only ...
How can I stop a running automation?
You can stop an automation from the Dashboard or end it by scheduling inside the workflow. Ways to stop 1) From the Automate Dashboard (My automations) Go to Automate → Dashboard → My automations. Open the row actions for the running automation. ...
What are Exit Conditions, and how do they work?
Exit Conditions are preset rules that end an automation when any one of them becomes true. Treat them as a safety switch that can stop a run regardless of where it is in the flow. How Exit Conditions work Exit Conditions are preset at the automation ...