Incorrect stoploss and squareoff prices

traderx
I placed an order like so on 22-06-2017 at around 12:16:00 PM

order_id = kite.order_place(tradingsymbol='NHPC',
exchange="NSE",
transaction_type=SELL,
price=33.8,
squareoff_value=13,
stoploss_value=13,
validity="DAY",
variety="bo",
quantity=1,
order_type="LIMIT",
product="MIS")

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 in advance for the help.
  • sujith
    Hi @traderx,
    Check out this thread to know how bracket order works on Kite Connect.
  • traderx
    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?

    Thank you
  • sujith
    Hi @traderx,
    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.
  • traderx
    Thanks.

    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."

  • sujith
    User requirement:
    In this example, the user wanted to place the stop-loss at price Rs1.5. Hence 18.1 is the points ( the difference between LTP and stop-loss price).
    System behavior:
    In the above scenario, the system will not set it to Rs1.5, rather it will set the stop-loss to lower circuit value.

    Tick size for RCOM is 0.05 and 18.1%0.05 is 0.
  • traderx
    Thanks for the help, I figured it out.

    Your documentation should be a lot better otherwise it is very confusing. There are so many posts on the same.
This discussion has been closed.