☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.8K
All Categories
0
Incidents
153
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
December 2016
Mohit
December 2016
sujith
Setting stoploss
Mohit
December 2016
in
Python client
Hi,
I went to put a stoploss on my positions and this stoploss need to be updated every N minutes.
e.g. Let's say I have a long position in NIFTY future. Current price is 8200. My SL is 8100.
First, how can I put the Stoploss ?
Second, if the NIFTY price increases to 8300, my SL is 8150. How can I change it ?
A sample code would be highly appreciated.
Best Regards,
Mohit
sujith
December 2016
Hi Mohit,
Use bracket order. It is similar to what you are asking for. Checkout
https://kite.trade//docs/connect/v1/#placing-orders
Mohit
December 2016
Hi Sujith,
Two problems:
First, bracket order supports only the 'LIMIT' order. I intend to trade at market.
Second, How do I change the stoploss later according to my algo logic if the price increases/decreases ? Kindly note that I am not using trailing stoploss.
sujith
December 2016
Hi Mohit,
Once your buy order is executed, you can place sell stoploss order and keep modifying price and trigger price every minute.
Mohit
December 2016
Hi Sujith,
Could u please provide a sample code for that, especially modifying the trigger and stoploss price ?
Many Thanks
Mohit
sujith
December 2016
Hi
@Mohit
,
Checkout examples here
https://github.com/rainmattertech/javakiteconnect/blob/master/sample/src/Examples.java
This discussion has been closed.
Use bracket order. It is similar to what you are asking for. Checkout https://kite.trade//docs/connect/v1/#placing-orders
Two problems:
First, bracket order supports only the 'LIMIT' order. I intend to trade at market.
Second, How do I change the stoploss later according to my algo logic if the price increases/decreases ? Kindly note that I am not using trailing stoploss.
Once your buy order is executed, you can place sell stoploss order and keep modifying price and trigger price every minute.
Could u please provide a sample code for that, especially modifying the trigger and stoploss price ?
Many Thanks
Mohit
Checkout examples here https://github.com/rainmattertech/javakiteconnect/blob/master/sample/src/Examples.java