The order was placed successfully with order ID 170622000461676
However when I check on the Kite dashboard the SL-M trigger price is 37.45 which is incorrect. The correct price should be 33.8 + (0.05 * 13) which is 34.45
Similarly, the squareoff trigger price is 30.65 when it should be 33.8 + (0.05 * 13) which is 33.15.
Why is there this discrepancy? Is there something wrong with my call?
Thanks I looked at it. In your example from the thread:
order_place(exchange = 'NSE', tradingsymbol = RCOM, transaction_type = 'BUY', quantity = 44, price = 19.6, product = 'MIS', order_type = 'LIMIT', validity = 'DAY', trigger_price = '0', disclosed_quantity = None, squareoff_value=1.2, --------> This is points (which is correct?) stoploss_value=18.1, --------> This is a price (which is correct?) trailing_stoploss= 1, variety="bo" )
For my order below: order_id = kite.order_place(tradingsymbol='NHPC', exchange="NSE", transaction_type=SELL, price=33.8, squareoff_value=13, (what does this come to in terms of price) stoploss_value=13, (what does this come to in terms of price) validity="DAY", variety="bo", quantity=1, order_type="LIMIT", product="MIS")
Heres how Im calculating the points. ( (trigger - price) / tick_size ). Is this correct?
Please note the following constraints, 1. If the stop-loss value you provide goes below lower circuit then it will be set to lower circuit value. 2. If the square-off value goes above upper circuit then it will be set to upper circuit value. 3. All the points you define must be multiple of tick size for square-off, stop-loss and trailing stop-loss. 4. The minimum value for trailing stop-loss is 1. You can't set the trailing stop-loss value below 1.
Check out this thread to know how bracket order works on Kite Connect.
order_place(exchange = 'NSE',
tradingsymbol = RCOM,
transaction_type = 'BUY',
quantity = 44,
price = 19.6,
product = 'MIS',
order_type = 'LIMIT',
validity = 'DAY',
trigger_price = '0',
disclosed_quantity = None,
squareoff_value=1.2, --------> This is points (which is correct?)
stoploss_value=18.1, --------> This is a price (which is correct?)
trailing_stoploss= 1,
variety="bo"
)
For my order below:
order_id = kite.order_place(tradingsymbol='NHPC',
exchange="NSE",
transaction_type=SELL,
price=33.8,
squareoff_value=13, (what does this come to in terms of price)
stoploss_value=13, (what does this come to in terms of price)
validity="DAY",
variety="bo",
quantity=1,
order_type="LIMIT",
product="MIS")
Heres how Im calculating the points. ( (trigger - price) / tick_size ). Is this correct?
Thank you
All values provided are in points.
Please note the following constraints,
1. If the stop-loss value you provide goes below lower circuit then it will be set to lower circuit value.
2. If the square-off value goes above upper circuit then it will be set to upper circuit value.
3. All the points you define must be multiple of tick size for square-off, stop-loss and trailing stop-loss.
4. The minimum value for trailing stop-loss is 1. You can't set the trailing stop-loss value below 1.
This is from the example that YOU provided!!
order_place(exchange = 'NSE',
tradingsymbol = RCOM,
transaction_type = 'BUY',
quantity = 44,
price = 19.6,
product = 'MIS',
order_type = 'LIMIT',
validity = 'DAY',
trigger_price = '0',
disclosed_quantity = None,
squareoff_value=1.2, --------> This is points (which is correct?)
stoploss_value=18.1, --------> This is a price (which is correct?)
trailing_stoploss= 1,
variety="bo"
)
For squareoff_value you have provided points. For stoploss_value you have provided price. Should I make the call like this or use points for both?
See your point 3. "All the points you define must be multiple of tick size for square-off, stop-loss and trailing stop-loss."
Tick size for RCOM is 0.05 and 18.1%0.05 is 0.
Your documentation should be a lot better otherwise it is very confusing. There are so many posts on the same.