Controlling sell and buy sequence — Tradetron Community
← Community

Controlling sell and buy sequence

Uncategorized 2,929 views

Pankaj

How can I first buy my sell position and only after that my buy position shoud sell. So that I don’t get margin issue

Pradeep

How can I first buy my sell position and only after that my buy position shoud sell. So that I don’t get margin issue?
I am also looking for the answer.

Nelson Tradetron team

Please check the below strategy creation format to address your above questions:

Tradetron Team Tradetron team

Yes, for exits. Turn on Exit Shorts First in the strategy’s Advanced Settings (under the Tranching section).

What it does

  • Short (sell) legs are squared off before long (buy) legs, so you are never left with a naked short while the hedge is still open.
  • It applies to set exits, the Universal Exit and the Exit button on the Deployed page.
  • Exits become leg-wise, so the deployment shows Exit Pending until every leg is out. That is normal.

Example

Iron condor exit at 15:15: the two sold options are bought back first, then the two bought hedges are sold.

For entries (hedge first)

Exit Shorts First does not change entry order. Legs in the same entry are not guaranteed to go in a fixed order. To take the hedge first, put the buy legs in their own set and gate the sell set on it, e.g. Set 1 (buys) writes hedged = Number(2) in its runtime, and Set 2 (sells) requires Get Runtime(hedged) == Number(2). See also the iron condor thread linked above.

Test in Live Offline first.

:sparkles: Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.