Conditional orders

Hi ,
I want to buy options which has trigger based on Nifty Futures,
for eg:- let us say nifty is about to break 12000 on the upside and i want to execute an 12000 CE based on when nifty will break 12000 it should automatically trigger a trade in 12000CE , which are called conditional orders.

Any idea how do i do this ?
  • dinezh

    it's quite simple


    position = False
    breakout_price = 12000
    if nifty_price > breakout_price and position == False:
    position = True
    kite.placeorder( symbol="NIFTY20NOV{ breakout_price }CE"
  • dinezh
    dinezh edited November 20
    This code is just for understanding the idea of the algo you're asking.
    once you understand the idea you can completely automate it
Sign In or Register to comment.