It looks like you're new here. If you want to get involved, click one of these buttons!
OrderParams orderParams = new OrderParams();
orderParams.orderType = Constants.ORDER_TYPE_SL;
orderParams.tradingsymbol = tradingSymbol;
orderParams.quantity = quantity;
orderParams.price = price;
orderParams.transactionType = sideOfTrade.toUpperCase();
orderParams.exchange = Constants.EXCHANGE_NFO;
orderParams.product = product;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.triggerPrice = triggerPrice;
orderParams.stoploss = stopLoss;
orderParams.tag = tag; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed
Order order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);
The trigger price in the order params is for stop-loss order's trigger price and the stop-loss field is for bracket order. Both the fields are used for different types of orders.
Hi Sujith the problem is when I try placing exit orders for target and stop loss then I need extra margin for one of the exit order which is a bottleneck. When I place trade manually I dont require any extra margin. Now the margin becomes huge in case I am selling an option. For example if I buy a Nifty as nrml trade ... and choose stop loss and target manually I dont need any extra margin (the margin which is required to buy Nifty option is sufficent) .. however when I buy it programmetically and try placeing stop loss order and a target order then system asks for extra margin for one of the exit trade and amount is huge ...
So just wanted to cross check by when would you be able to code for nrml order with stop loss and target as we can do in mannual trade.
If there is any work around then please let me know.
I hope my question is clear if not then please let me know.
Thanks,
Vikas
That doesn't work?
I want to emulate same order as attached programmatically .. please let me know how can it be achived without extra margin requirement compared to what is shown in the picture ..