TrailingStoploss in ROBO Order
-
Hi @admin,
Could you please help me understand why
trailingStopLossis not working in the below ROBO order?I am placing a BO (Bracket Order) with
variety = "ROBO"andproducttype = "BO"using a normal BUY ROBO order (notSTOPLOSS_LIMIT).Even though I am passing
trailingStopLoss: "5", the trailing stop loss does not seem to get applied.Here is my order payload:
orderparams = { "variety": "ROBO", "tradingsymbol": symbol, "symboltoken": str(token), "transactiontype": "BUY", "exchange": EXCHANGE, "ordertype": "LIMIT", "producttype": "BO", "duration": "DAY", "price": str(entry_price), "squareoff": "10", "stoploss": "2", "trailingStopLoss": "5", "quantity": str(qty), }Could you please confirm:
- Is
trailingStopLosssupported for ROBO BO orders in SmartAPI? - Is the correct parameter name
trailingStopLossor should it be something else liketrailing_stoploss? - Are there any restrictions or minimum values required for trailing stop loss in ROBO orders?
Thank you.
- Is
-
Dear @admin , I wanted to kindly follow up on my earlier request as I haven’t received a response yet. Please let me know if any additional information is required from my side
-
Check this:
def PlaceRoboOrder(self, TradingSymbol, Token, BuySell, Exchange, Quantity, Price, stoploss,squareoff):
try:
orderparams = {
"variety": "ROBO",
"tradingsymbol": TradingSymbol, #"SBIN-EQ",
"symboltoken": Token, #"3045",
"transactiontype": BuySell, #"BUY",
"exchange": Exchange, #"NSE",
"ordertype": "LIMIT", #"LIMIT",Limit_Market
"producttype": "BO",
"duration": "DAY",
"price": Price, #"19500",
"squareoff": squareoff,
"stoploss": stoploss-1, #"0",
"quantity": Quantity, #"1"
"triggerprice" : stoploss, #Price-stoploss
"trailingstoploss": 5
}
smartApi.placeOrder(orderparams)