@Hardik thanks for the quick reply
They are required if we want to put SL along with entry.
I have defined a condition on Trading view and when that condition is met, the alert gets triggered and you enter automatically via webhook.
But at the same time, you want to place SL as well so that you dont have to look at screen and put it manually.
I will give you more details to clarify. I have the following code in pine script
if condition_is_met
alert('{"transactionType":"B","orderType":"MKT","quantity":"10","price":"0","exchange":"NSE","secret":"AFVwh","tradingSymbol":"' + syminfo.ticker +'","productType":"I"}', freq=alert.freq_once_per_bar_close)
alert('{"transactionType":"S","orderType":"LMT","quantity":"5","price":"user_defined","exchange":"NSE","secret":"yUMuD","tradingSymbol":"' + syminfo.ticker +'","productType":"I"}', freq=alert.freq_once_per_bar_close)
As you can see in this case, I am able to enter and put a limit order to book half the quantity at the same time at take profit level. But I cant put a SLM order.
I want to add something like this :
alert('{"transactionType":"S","orderType":"SLM","quantity":"10","price":"SL_LEVEL","exchange":"NSE","secret":"AFVwh","tradingSymbol":"' + syminfo.ticker +'","productType":"I"}', freq=alert.freq_once_per_bar_close)
I want an SLM order to be kept as my SL which DHAN webhook does not allow. That would make so much easier. You can put SL and take profit at the same time.
Hope this makes it clear. Thank you