How to specify max allocation for a trade? — Tradetron Community
← Community

How to specify max allocation for a trade?

Strategy 2,517 views

Soumyajyoti Biswas

How can I specify max allocation for a trade instead of hardcoding lots for purchasing options? I want to purchase say x number of lots that can be purchased for a total of 25000.

So if LTP for Nifty 50 ATM is 100 and lot size is 50, I want to purchase 5 lots as my max allocation is 25000.
if LTP is 101, the traded quantity will only be 4 lots.

Anshu

You can specify value as 25000, this would purchase lots basis the price.

I have a different problem though.
I want to provide value but at the same time want to limit the number of lots to x in case the price is really low. How can I achieve this?

Abhijit Bhattacherjee

Using both may not be possible. You have to use either value or lot.

Anshu

Thanks for your reply.

Another thing that could work for me is not taking a trade when the price is lower than specified price.

For this I added below condition in Condition Builder

But in notification log I see the LTP is very different from the actual trade price. e.g. LTP was shown as 60 but the CE trade was taken at 112.
Any insights on what could have caused this? How can I ensure the LTP of instrument price is picked correctly? I am trying to pick the spot price in Position Builder like this -

Abhijit Bhattacherjee

You have to use traded instrument name keyword instead of just instrument name in your LTP condition. There is a possibility that ATM of strike might get shifted after execution of your trade if there is a price action movement.

Anshu

I understand well that in exit conditions we must use traded instrument name to find LTP of the traded instrument.

But here the LTP is in the Entry condition. How does “Traded Instrument Name” work here as no trade has been taken, and I want to initiate trade only when price is > 33.

Abhijit Bhattacherjee

You are correct, then your condition under entry is correct. Then there may be an issue with position selection. How you making sure of same CE stike in your position definition? Ideal way would be to use runtime variable under initialization, define 2 variable to capture your strike and price of strike. In your entry and position builder use those to variable.

Anshu

This is exactly what I need. I need to capture strike and price in my entry condition and use these in the position builder.

But I don’t know how to achieve this. Is there any example you can share, that I can learn from?

Appreciate your help, thanks in advance.

Tradetron Team Tradetron team

Max allocation: in the Position Builder choose Value instead of Lots and enter 25000. Tradetron buys the number of lots that fit. You cannot combine Value and a lot cap on the same leg.

Why LTP in the entry differed from the fill: the entry condition and the leg’s strike are worked out separately. If your condition reads LTP(Instrument Name ATM ...) and price moves, ATM can shift by the time the order is placed. Traded Instrument only works after a trade, so it cannot be used in the entry.

To keep them aligned:

  1. Build the condition’s instrument with exactly the same strike formula as the leg (e.g. both ATM SPOT(NIFTY 50, 0) with the same expiry).
  2. Or pick the strike by premium with Find Strike (field ltp) so the leg itself is chosen by price.
  3. Check the Notification Log to see what was evaluated.

Keywords: Keyword Documentation — Tradetron

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