Kite_Options_Trade v1.0 is a Python algorithm designed to execute stop-loss and target orders for Index Options based on the Index Spot Price.
Index options contracts are derivatives of the Index spot chart. The price of options depends on the spot price, prompting the need to set stop loss and target orders based on the spot chart. This algorithm addresses the absence of such a feature on the Zerodha Platform, allowing traders to automate stop loss and target orders for options based on the spot price.
Currently, v1.0 supports three Indices:
- Nifty
- BankNifty
- FinNifty
The algorithm offers two primary feature options:
- Place a new option order based on the spot price.
- Add stop loss and target to an existing options order.
-
Obtain the Enc Token:
-
Execute the Algorithm:
- Insert the enc token into the algorithm and execute the command:
Python main.py
. - The algorithm will present three options:
- Place a new trade.
- Add SL and Tgt to an existing position.
- Testing.
- Insert the enc token into the algorithm and execute the command:
-
Placing a New Order:
- For option 1) Place a new order:
- Choose the Index you want to trade for by entering the respective option number.
- Input the details of the option contract for which you want to place the order.
- Enter the trigger price based on the spot price.
- The algorithm will initiate and place the options order once the spot price surpasses the trigger price.
- For option 1) Place a new order:
-
Adding SL and Tgt to an Existing Position:
- For option 2) Add SL and Tgt to an existing position:
- Select the Index for which you wish to set Stop Loss and Target by entering the corresponding option number.
- Enter the Stop Loss and Target Price based on the spot price.
- The algorithm will then set the Stop Loss and Target for the Index options order based on the spot price.
- Note: This algorithm currently supports setting Stop Loss and Target for the most recent ongoing position. Future updates will enable multiple position support.
- For option 2) Add SL and Tgt to an existing position:
-
Testing:
- Option 3 is intended for testing purposes.
Happy Trading :)