JSON and Webhook

Please let me know if the below process is correct / not correct. What would be the correct process.

If I create two alerts – “Buy Alert” and “Buy Exit Alert”.
“Buy Scrip” :- B - Nifty 19400 CE (buy scrip) – cost Rs. 4000/-
“Buy Exit Scrip” :- S - Nifty 19400 CE (sell scrip) – cost Rs. 96,000/-
And generate JSON for both scrips.

Then link
“Buy Alert” with “Buy Scrip”.
“Buy Exit Alert” with “Buy Exit Scrip”

Hear is this one complete order cycle. Is it a buy and exit form same trade?
Also no margin facility is applicable?

or how can I link one indicator - having both “buy signal” and “buy exit signal” - with two scrips - with two different JSON?

can “basket order” - with both scrip (mention above) - can be applied on one indicator for buy and exit?

Hello @fortu3

Great to see you exploring Dhan Webhooks!

Yes, the first part that you said is correct. Two separate alerts needs to be created to be able to achieve this.

Yes, this is one complete order cycle.

You will require margin to enter the position, in this case buy. But when you are squaring off the position, you won’t require any extra margin.

You can do this. However, you will need to select the appropriate conditions for your long and long exit orders in the indicator. For example, an indicator like Moving Average, you will need to mention that you want crossing from above or below to specify Long or Long Exit alert trigger.