← Algo & Backtesting

Risk limits and the daily kill switch

Every strategy can have its own stop and still the day can run away, because five strategies each losing within their limits is one large loss. The Risk page sets limits above all of them: for you, and for each broker account.

Two layers above your strategies

Strategy stops protect a trade. Risk limits protect the day.

Algo has two layers. Your limits apply to you across every strategy. Per-broker hard limits apply to everything routed through one broker account, across all portfolios. Both reset at IST midnight. Leave a field at 0 and that check is off.

Your limits: max daily loss and max daily trades

LimitHow it works
Max daily loss ₹Watches realised P&L — booked from closed legs — for the IST day. When it reaches −limit, the kill switch trips.
Max daily tradesCaps entry orders for the day across all strategies. Once reached, no further entries are placed.

When the kill switch trips, the strategy whose exit crossed the limit squares off its remaining legs, no strategy places a new entry or re-entry, and no new strategy can start. That holds until IST midnight, or until you press Reset today.

Because it reads realised P&L, the kill switch reacts to booked losses. A large open loss that has not been closed does not trip it on its own; each strategy's own stops still manage those positions.

Risk Settings: Max daily loss and Max daily trades under Limits, then per-broker daily loss cap, max concurrent and capital cap.
Risk Settings: Max daily loss and Max daily trades under Limits, then per-broker daily loss cap, max concurrent and capital cap.

Per-broker hard limits

LimitHow it works
Daily loss cap ₹Adds up today's P&L of every live run on the account, open positions included. At −cap, every live run on it is squared off and no new runs launch on it until IST midnight.
Max concurrentRefuses to launch another run once this many are live on the account.

The two loss limits complement each other. The per-broker cap watches running P&L including open positions and flattens the account; your max daily loss watches booked P&L across everything and stops new trading. Use both if you run more than one account.

Today's State

The Today's State card is the live tally the kill switch reads: realised P&L so far today, trades today, and the kill switch as OK or TRIPPED. It resets by itself at IST midnight.

Reset today clears it manually. Treat that button as a decision, not a convenience: the limit existed for exactly the moment you now want to remove it.

A worked example

Hypothetical settings: max daily loss ₹15,000; Account A daily loss cap ₹12,000.

Without the broker cap, the kill switch would have waited for Strategy 2 and 3 to close by their own stops before reacting.

Choosing the numbers

A limit set from a feeling is usually either never reached or reached every week. Two better anchors:

Set Max daily trades a little above what your strategies need, including re-entries. Its job is to catch a strategy entering again and again by mistake, not to ration normal trading.

Where to find it

  1. In Algo, open Risk (under Algo for live, or Forward Test).
  2. Under Limits, enter Max daily loss and Max daily trades and click Save.
  3. Under Per-Broker Hard Limits, set a daily loss cap and max concurrent for each account.
  4. Check Today's State during the session.

Portfolio-level caps are covered in portfolios.

Common questions

When does the Algo kill switch reset?

Automatically at IST midnight. You can also clear it earlier with Reset today on the Risk page.

Does the daily loss kill switch count open positions?

No. It counts realised P&L from closed legs. The per-broker daily loss cap is the limit that includes open positions.

What happens to my strategies when the kill switch trips?

The strategy whose exit crossed the limit squares off its remaining legs, no strategy places new entries or re-entries, and new strategies cannot start until midnight or a manual reset.

Can I set different loss limits per broker account?

Yes. Each broker account has its own daily loss cap and max concurrent limit under Per-Broker Hard Limits on the Risk page.

More on Algo & Backtesting

More in Algo & Backtesting · App: Algo & Backtest · Definitions: glossary · All: every article