How to get leftover premium of a strategy? — Tradetron Community
← Community

How to get leftover premium of a strategy?

Strategy 900 views

Sharad Naik

I have a single set strategy of short straddle where entry is taken in a set and then the legs are exited and re-entered in Repair Once conditions (total Repair once conditions are 6).

At any given time I want to know what is the total left over premium, i.e. the sum of LTP of the legs in trade. Since the legs in trade can be either from set entry or from any one of the repair once entries or sometimes there will be only one leg trading, how can I get the total left premium?
One way I thought of is define a runtime variables like “ActiveCE” and “ActivePE” and at each entry condition of set and repair once assign traded instrument name to each. Then with Positions Details keyword check whether both CE & PE are in trade or if only CE or only PE is in trade and accordingly get the left over premium.

Want to know if there is simpler way to do this.

Tradetron Team Tradetron team

Use Open Positions Detail with return field current value (and the option filters). It covers only what is open now, wherever it came from (entry or any Repair Once). Closed legs drop out automatically.

  • Open Positions Detail('Short', 'All', 'NIFTY BANK', 'current value') = current value of your open short legs.
  • Open Positions Detail(..., 'quantity') or 'count' tells you how many legs are still open.

current value is quantity × current LTP with the sign of the position, so for short legs it is negative; wrap it in Absolute if you want a positive number. Divide by the open quantity if you need premium per unit. Test in Live Offline and check the value in the Notification Log. Keyword reference: Keyword Documentation — Tradetron

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