Hope you are doing well.
I have defined the long and short positions in the pine script and also defined conditions to buy and sell options.
Today on 11:30 long ordered tiggered and the order was placed on dhan ,the json message was -" {“secret”:“YtdEY”,“alertType”:“multi_leg_order”,“order_legs”:[{“transactionType”:“B”,“orderType”:“MKT”,“quantity”:“1”,“exchange”:“NSE”,“symbol”:“BANKNIFTY”,“instrument”:“OPT”,“productType”:“I”,“sort_order”:“1”,“price”:“0”,“option_type”:“CE”,“strike_price”:“51800”,“expiry_date”:“2025-01-29”},{“transactionType”:“S”,“orderType”:“MKT”,“quantity”:“1”,“exchange”:“NSE”,“symbol”:“BANKNIFTY”,“instrument”:“OPT”,“productType”:“I”,“sort_order”:“2”,“price”:“0”,“option_type”:“CE”,“strike_price”:“52300”,“expiry_date”:“2025-01-29”}]} "
But at 01:27 pm short ordered was tiggered with jason message - “{“secret”:“YtdEY”,“alertType”:“multi_leg_order”,“order_legs”:[{“transactionType”:“B”,“orderType”:“MKT”,“quantity”:“1”,“exchange”:“NSE”,“symbol”:“BANKNIFTY”,“instrument”:“OPT”,“productType”:“I”,“sort_order”:“1”,“price”:“0”,“option_type”:“PE”,“strike_price”:“51000”,“expiry_date”:“2025-01-29”}”,{“transactionType”:“S”,“orderType”:“MKT”,“quantity”:“1”,“exchange”:“NSE”,“symbol”:“BANKNIFTY”,“instrument”:“OPT”,“productType”:“I”,“sort_order”:“2”,“price”:“0”,“option_type”:“PE”,“strike_price”:“50500”,“expiry_date”:“2025-01-29”}]}"
But the orders was not placed on dhan with same URL and security key and i can’t find any reason behind it and it has made me confused because i dont know what error/bug has casued this issue, Could you please provide some assistance on this issue.
Thanks & Regards
Mayank