Skip to main content

Square Off All Positions

What is Square Off All Positions?

The Square Off All Positions action allows users to close all open positions when a condition is met.
This ensures that no active trades remain before executing new trades.


How Square Off Works

  1. A condition is evaluated.
  2. If the condition is true, the Square Off All Positions action is executed.
  3. The system automatically closes all open positions across the strategy.

📌 Example Workflow:

  • Condition: "50 EMA crosses below 200 EMA"
  • Action 1: Square off all open positions
  • Action 2: Place a new Sell order

Why Use Square Off?

Avoid conflicting trades – Ensures old positions are exited before new ones are taken.
Risk Management – Helps prevent overexposure by clearing existing trades before placing new ones.
Strategy Reset – Allows the strategy to start fresh when new entry conditions are met.


Next Steps

✅ Add Square Off All Positions before new trade actions
✅ Use with EMA Crossover, RSI, or other momentum-based strategies
✅ Test using Backtesting to refine execution timing