It looks like you're new here. If you want to get involved, click one of these buttons!
kite.place_order(tradingsymbol=symbol,
exchange=kite.EXCHANGE_NFO,
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=quantity,
order_type=kite.ORDER_TYPE_MARKET,
product=kite.PRODUCT_MIS,
variety=kite.VARIETY_REGULAR)
kite.place_order(tradingsymbol=symbol,
exchange=kite.EXCHANGE_NFO,
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=quantity,
order_type=kite.ORDER_TYPE_LIMIT,
price=target,
trigger_price = target,
product=kite.PRODUCT_MIS,
variety=kite.VARIETY_REGULAR)
For example, I want 1% stop loss
So my sl_price should be
ltp - 0.01*ltp = 0.99 * ltp
right?And how should I take modulo tick_size to make it a multiple of tick_size, 0.05 in my case.
Also, make sure you are setting up correct transaction_type here
"transaction_type": kite.TRANSACTION_TYPE_BUY
. If you are looking for sell exit, transaction_type should be SELL. Yes, sl_price here should be sl value not difference value. So,ltp - 0.01*ltp = 0.99 * ltp
is fine. This thread should help.I have one more query.
Now I also have one more sell exit condition apart from stop loss and target. So it may be possible that this condition is satisfied but GTT orders are still pending.
How to take this situation into consideration?
You will have to do this other order cancelation at your end for open orders/GTT.