How to place SL order immediately after entry with Trigger price

Let us say I have short straddle strategy. When the positions are entered, I want to place immediately a counter order for “Buy” my options entry with SL as 20 or 30% from my selling price.

If I configure something like this.

But the problem here is, this will execute only execute a repair order when LTP is greater than 1.21 of my entry price. I want an exit order to be placed immediately when my entry order is executed.

The Reason for doing this is to avoid slippages. Can you help me to implement this?

And on universal exit condition, that is to close all the positions at 3:20pm. Any pending orders from previous step should get cancelled.

2 Likes

You can put an SLM order in your strategy using repair once condition.


strike formula :
slm - strike

SL Trigger formula:

For second position in entry, leg number will be 2 in traded instrument keyword.

3 Likes

Thank you sir… :+1:

@vikram.bajaj @umesh It is placing market order immediately on the next condition check.

1 Like

Hello All,

I tried below to place SL-M order after entry but the same is not working, can any one please guide/suggest what correction is required in below code…

Repair Once Condition

Position Condition

2

Function code for Stoploss trigger

Sorry it was not allowing to post all images in 1 post, so had to post in multiple…

Thanks and Regards,
Ritesh Jain

remove traded instrument from repair

Hello @Ujjwal

You mean this I need to delete and keep only the positions code as per above?

Regards,
Ritesh Jain

1 Like

yes Ritesh, very true. please check over paper trading once

Hello @Ujjwal ,

I tried, but the SL order got rejected, Getting below error

28 Sep 10:00:21 AM Unable to get order_id: Received Invalid Response {“body”:{“BrokerOrderID”:317233504,“ClientCode”:“54544140”,“Exch”:“N”,“ExchOrderID”:"",“ExchType”:“C”,“LocalOrderID”:0,“Message”:“Order rejected by RMS. Limit price should be within circuit limit(1981.55 - 2421.85)”,“RMSResponseCode”:-31,“ScripCode”:2885,“Status”:1,“Time”:"/Date(1601231400000+0530)/"},“head”:{“responseCode”:“5POrdReq”,“status”:“0”,“statusDescription”:“Success”}}

Regards

Hello @Ujjwal

i tried exploring the order placed for stop loss it seems the order is going as normal order as against stoploss order which could be the reason for the getting rejected by 5paisa, how can this be fixed…

Regards
Ritesh

hi
i am facing the same issue
i tried putting stoploss trigger fx in position as well as repair once condition but still no SL order is being placed


this Stoploss trigger fx in positions


This is strike selection FX in repair once condition

note: unable to. post 3 consecutive replies
the FX condition in repair once is same as asked to do in this thread

but still after this no SL order. is being placed

Hi

Can somebody confirm if order sent this way through stop loss trigger option in position window is a true SLM type order or just an ordinary market order?

I am surprised that this issue is not yet fully resolved given the fact that pre placement of an SLM type order is so crucial to trading.