How to stop new entries when the strategy has used its capital — Tradetron Community
← Community

How to stop new entries when the strategy has used its capital

Keyword help 1,778 views

Hiren

Hi,

How do I restrict the entry when I am out of capital ?

I thought that the capital condition in the strategy would help and return an error message but it still keeps on firing and taking positions.

I also tried using “Capital Deployed” function in the condition builder for entry but i think i am not using it correctly so it is still not working.

Please suggest a solution to this.

Thanks
Hiren

2 3

sampsan

PNL< NUMBER(-20000)
You add max loss can be achieved value in the number
Add this condition in Universal exit .

Hiren

My question is something else.

Lets say I have 1Lac in my brokers account.

Now, I want the algo to stop firing signals when this limit is exhausted (or else the orders will get rejected at the broker’s end).

How do I do this ?

Hiren

Yesterday I tried using “Margin” and put a limit of 1,05,000 (when the exposure was less than 102K) but looks like even this is not working. Dont know what would work.

Tradetron Team Tradetron team

Tradetron cannot read the free balance in your broker account, so there is no keyword that stops entries “when the broker runs out of money”. What you can do is cap what the strategy itself uses:

  • Capital Deployed returns the capital currently in this strategy’s open positions. Add to the entry condition with AND: Capital Deployed('total') < Number(100000).
  • Margin returns the margin currently blocked by the strategy.
  • Open Positions Detail(…, ‘count’) caps how many instruments can be open at once.

The Capital Required field in the strategy settings is only a display/reference number (read it with the Required Capital keyword); it does not block orders.

Notes:

  • The check happens before the order, so one more entry can still go through if a single trade is larger than the remaining room. Leave a buffer.
  • If the broker rejects an order for margin, the strategy goes to Error Execution; the reason shows in the Notification Log.

Test it in Live Offline before going live.

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