Retry Mechanism: Stratzy’s Most Requested Feature Update

Hey folks

As always, we’ve been listening to your feedback and working towards building features that genuinely improve your Algo trading experience.

Since 1st April, many of you have experienced situations where orders remained pending or did not get filled due to LIMIT orders under the updated exchange framework. We understand how important reliable execution handling is, and this was a challenge for us as well.

Our engineering team has worked extensively on this, and we’re excited to bring you Version 1 of our Retry Mechanism.

Here’s how it works:

Entry Orders

For entry orders, the Algo will continue to follow its execution logic without retries.

Single Leg Algos

For single-leg option strategies, orders are placed as usual. If the order remains pending, it will automatically be cancelled once the exit for that signal is achieved. There is no benefit in entering a trade after the signal has already completed. This functionality has been available on Stratzy for a long time.

Multi-Leg Algos

For multi-leg strategies (Straddles, Strangles, Credit Spreads, etc.):

  1. The Algo first places the order for Leg 1
  2. The order status is checked every half-second for 3 seconds (6 checks)
  3. If Leg 1 executes successfully, the Algo places the order for Leg 2
  4. If Leg 1 remains pending after these checks, the Algo proceeds with placing Leg 2

In some cases, the second leg may be rejected by broker RMS since the hedge benefit is not unlocked yet because the first leg is still pending.

If this happens:

  • Cancel the pending first-leg order

  • If the first leg gets executed, close the position manually

Alternatively, the Algo will manage the exit for positions that were entered by the Algo itself.

:warning: Please do not manually place the rejected leg again to recreate the multi-leg strategy, as the Algo will only manage exits for trades that were placed through the Algo.


Exit Orders

Single Leg Exit

If an exit signal is generated and your LIMIT order remains pending:

  • The Algo will wait for 2 minutes

  • Cancel the pending order

  • Place a fresh retry order

Two-Leg Hedge Strategies

The Algo will first place the order for the leg that releases the hedge benefit.

If the first leg executes:

  • The Algo places the second leg order

  • If the second leg remains pending, after 2 minutes, the Algo cancels and retries the order

If the first leg remains pending:

  • The Algo waits for 2 minutes

  • Cancels the pending order

  • Retries the first leg

After retrying, if the first leg still remains pending, the Algo will continue with the general execution check mechanism:

  • The Algo will check the order status 6 times (once every half a second) for a total duration of 3 seconds.

  • If the first leg gets executed during this window, the Algo will immediately place the order for the second leg.

  • However, if the first leg still remains pending after these checks, the Algo will proceed with placing the order for the second leg.

In some cases, the second leg may be rejected by the broker RMS since the hedge benefit is not unlocked yet due to the first leg still being pending.


:warning: Important Note

During the 2-minute retry window, we request users to avoid manual intervention.

Manually modifying orders during this period can result in the Algo not receiving the latest order status, which may lead to duplicate positions or incorrect execution handling.

This is our first version of the Retry Mechanism, and we will continue monitoring real-world execution behaviour and improving it further.

Thank you for your patience, feedback, and trust :heart:

More improvements coming soon :rocket:

12 Likes

Just spoke with Dhan account managers! :speaking_head: Apparently, if you send a buy order and then a sell order separately, you need full margin for that sell order. The margin benefit only kicks in after the sell order executes, meaning you’ll need a high margin for a credit spread in this scenario. That’s why my order got rejected today! For hedge margin benefits, you need to send both buy and sell orders together. How to handle This? So selling 3 lot of nifty Required 500000 if buy and sell r send in 2 different orders.

1 Like

Please elaborate the execution method of 2 leg strategies where 1 leg is buy & 1 leg is sell . Bcz if the order of placing the order is not correct then there will be margin call.

1 Like

Ye problem isi ki wajah se aayi h mujhe aaj??

Hi @Alphaedge

For a Spread at entry:

The long leg needs to be placed first; once the order is filled successfully, only then can the second short leg be placed to avail margin benefit.

If the order for the 1st leg is in PENDING state and the order for the 2nd leg (short) is placed, then the margin benefit is not unlocked yet as per RMS rules, and this order will be rejected due to insufficient funds.

For a Spread at exit:

The short leg needs to be placed first; once the order is filled successfully, only then can the second long leg be placed (as this is a part of a hedged trade)

If the order for the 1st leg is in PENDING state and the order for the 2nd leg (long) is placed, then, as per RMS rules, the order will be rejected, stating that this is a part of a hedge trade and to square off the short leg first to place an exit for this leg.

Hi @Manish_Ahuja

Please write to us at support@stratzy.in along with details such as:

  1. Algo name and the trade
  2. CSV file of the broker orderbook so that we can check all the Success, Pending, Failed, and Cancelled orders.

This will allow us to investigate and address your doubt clearly.

In Credit spread strategy, What to do if Short leg gets executed without Buy Leg getting executed assuming my account has enough margin to get naked short leg excuted ( I mean my account has enough fund to execute short leg without margin benefit of hedge leg)

Hi @nijinwilson

For Credit Spread strategies, the Algo always places the Long (Buy) leg first. In the scenario you’ve described, the Buy order remains pending, while the Short (Sell) leg gets executed because your account has sufficient margin to take the naked short position.

In such a case:

  • The Algo will automatically generate the exit order for the executed Short leg when the exit signal is generated.

  • The pending Buy order can be left as it is. If it gets executed later, the Algo will also generate the corresponding exit order for that leg automatically.

  • If the Buy order is still pending when the exit signal is generated, the Algo will automatically cancel this pending order.

However, if you manually cancel the pending Buy order and place a fresh Buy order yourself, the Algo will not have a record of this manually placed order. In that case, you will need to manage the exit of that manually entered position on your own.

I hope this provides clarity.

1 Like

Thank u. This clarification helps