Tick WebSockets - Close & Change fields

gautamsatpathy
What is the "Close Price" field (Bytes 40 - 44)? The "change" field of Tick class is set as a percentage change from the "lastTradedPrice" and the "Close Price" if the Close Price is not zero.
private void setChangeForTick(Tick tick, double lastTradedPrice, double closePrice){
if (closePrice != 0)
tick.setNetPriceChangeFromClosingPrice((lastTradedPrice - closePrice) * 100 / closePrice);
else
tick.setNetPriceChangeFromClosingPrice(0);
}
So, what exactly is this Close Price? Close of Previous Day? If so, then it is very good data to have. If not, what is it?

@sujith
  • sujith
    A change value is calculated in Indian market as the change between last price and previous day's close price that is streamed via ticker. In European markets it is the difference between last price and open price of the day.
    There are some edge cases in the exchange streamed data. Hence we are calculating those fields since all the underlying data is already streamed.
  • gautamsatpathy
    Thanks @sujith

    Are you saying that the "Close Price" field (Bytes 40 - 44) is "Previous Day Close Price"?
  • sujith
    Yes, ticker only has previous day's close price.
This discussion has been closed.