Order placing questions

I have a technical question

Lets say I sold 1000 qty of BN PE and CE.

I have a run once condition, when it meets, it buys double the qty of BN PE, in this case 2000 and buys 1000 qty CE. so in a way, I am reversing my position for one leg.

now, I have 1000 qty of long position in BN PE.

I want to exit, if this price is greater than lets say 20%, what should I write?

As below, I want to exit line 2.

CE leg was bought and closed.

I tried this, but didnt work

Deleting to avoid confusion…

Hi @whity It is a complex query so my apologies if I for it wrong but here is what I think.:

  1. Please note both Entry & Repair Once are entry conditions so if you buy in one and sell in other it will still look like 2 transactions of +1000 & -1000 instead of net 0.

  2. Assuming you are using only one repair once and only one script and only 1 set, the set, condition and leg will all be 1. so the below should work

  3. Please note it might be useful to break it into 2 different sets where your first set will sell 1000 CE & PE with combination ABC as exit for this set. The same combination ABC becomes an entry for the second set that buys 2000 CE and exits at 1.4 x entry price.

This will also improve the lag in trade because now the system is only checking 1 condition per set, more the no. of conditions, higher the calculation time, higher the lag.

1 Like

Thanks for the reply.

This is what how my strategy looks like. After getting some help from TT technical team, I was able to solve this issue.

It has 3 Repair once conditions 1, 2 and 3.

So these are the entry positions taken, which can be referenced as LTP(Traded Instrument Name(Entry,Instrument,NIFTY BANK,1,1,1) for CE and LTP(Traded Instrument Name(Entry,Instrument,NIFTY BANK,1,1,2) for PE.

Now, when one of the 3 repair once conditions are met, the entry price of the repair once condition will be referenced as LTP(Traded Instrument Name(RepairOnce,Instrument,NIFTY BANK,1,1,1) , LTP(Traded Instrument Name(RepairOnce,Instrument,NIFTY BANK,1,2,1) or LTP(Traded Instrument Name(RepairOnce,Instrument,NIFTY BANK,1,**3,**1) , provided only 1 leg is present.

Here the 1 refers to set 1 . 1, 2 or 3 refers to the repair once condition number and 1 represents the number of legs, in my case there is only 1 position taken within repair once condition. I hope this clears it.

5 Likes