Change percentage is not getting updated properly in OHLC part from kite ticker post pre-market

kbkvadivel
kbkvadivel edited March 2018 in Python client
Hi,

Change percentage is not getting updated properly in OHLC part from kite ticker after closing of pre-market (i mean between 9.08 and 9.14), as per my understanding time at 9.10 close value is yesterday's close and change % should be from yesterday's close to current LTP (pre-market price) when i get ticks. please clarify.

Also please guide me how to handle fake on-ticks (function) in-order to block triggering orders, so tat i can shoot exactly orders at 9.15 AM 01 seconds itself.
  • sujith
    @kbkvadivel,
    Kite Ticker sends a heartbeat signal every second to make sure that it is connected. If you get on-ticks with empty array then you can ignore and not process that.
    We just stream whatever we get from the exchange. If you don't see the correct value then you can calculate change percent at your end.

    Change % = (lastTradedPrice - closePrice) * 100 / closePrice
  • trade_then
    what is fake on-ticks (function). is this something unique to python client.
    if you mean you want only the ticks from 9:15:00 A.M onwards till 3:29:59 P.M.
    for that you will have put a filter at your end by comparing the Timestamp in the received ticks. So that ticks that are outside the range of trading hours are not passed into your strategy.

    Thanks
    Regards
  • sujith
    @trade_then,
    I think pykiteconnect doesn't send the callback.
    The way it works is in order to make sure connection is active Kite Ticker sends a 0-byte message every one second.
  • trade_then
    Aaaa Hann.. so that's how it is in Python.
    Thank God for c#.

    Thanks
    Regards @sujith
  • kbkvadivel
    Thank you very much @sujith, More appreciated for quick response.
  • kbkvadivel
    kbkvadivel edited March 2018
    @sujith : The way it works is in order to make sure connection is active Kite Ticker sends a 0-byte message every one second. --> how to check this 0 byte in python like len(ticks) > 0 ?

    also please confirm, time at 9.10am while invoke kws.connect() statement i get the first tick with subscribed instruments data and in second tick will i get 0 byte tick since market is yet to open after pre-market hours? so that if i mention len(ticks) > 0 after first tick would be fine to place order exactly at 9.15.01 am?
  • sujith
    @kbkvadivel,
    Apologies, it is 1-byte data and 0 tick data.
    It seems like pykiteconnect won't call the on_ticks callback for heartbeat ticks.

    The correct behavior is, let us say you subscribe for ticks in quote mode at 09:10 AM then you will get one tick and after that, you won't get tick data till market opens so you can expect that it won't send any data till 09:15 AM.
  • kbkvadivel
    Thanks Sujit for quick response
Sign In or Register to comment.