Issue: SL Limit Order Validation Error
-
I am encountering an error when trying to modify an open SL (Stop Loss) Limit Order. The error message is as follows:
status=false, message=Difference between limit price and trigger price for SL Limit Order is beyond the exchange’s Permissible range of < 1.5 >. Consider setting the limit price to < -1.5 > or higher, errorcode=AB1007
OrderParams orderParams = new OrderParams(); orderParams.quantity = 25; orderParams.price = 100.0; orderParams.symboltoken = symbolToken; orderParams.tradingsymbol = tradingSymbol;//Nifty50 index call/put trading symbol orderParams.exchange = "NFO"; orderParams.ordertype = Constants.ORDER_TYPE_STOPLOSS_LIMIT; orderParams.producttype = Constants.PRODUCT_CARRYFORWARD; orderParams.duration = Constants.DURATION_DAY; orderParams.transactiontype = Constants.TRANSACTION_TYPE_SELL; orderParams.triggerprice = String.valueOf(101.5); smartConnect.modifyOrder(orderId, orderParams, "STOPLOSS")