Hello, I have been facing a few problems in figuring out the close of a candle. Through some trial and error, I have come to the presumption that 0th second of the next candle is the close, for example, if you want to find the close of 34th minute, then 0th second of the 35th minute is the close for the 34th minute.
However here is where I am facing an issue: At the 0th second, sometimes there are two ticks that are sent out in the same second, so which one do I consider as the close of the candle? Consider BANKNIFTY 20th JAN 38200 PE (instrument token- 12402178) on 14-Jan-2022: 1. 11:42 am, to get the close of the candle at 11:42, I wait for the 0th second tick(s) of the 43rd minute and here is what I receive:
Now to compare this with the actual close of the candle, from the chart itself:
In this case the second tick received in the 0th second is the close.
2. 11:43 am, close will be 0th second of the 44th minute:
Comparing this with the close from the chart:
Here, the first tick received in the 0th second is the close.
My doubt/query: 1. Is there a particular or predetermined second which is considered to be the close of a given minute? 2. Assuming that my presumption is correct i.e., 0th second of the next candle is the close, which one do I take as the close? The first or the second tick in the 0th second?
P.S. I understand that this may seem like a minor issue, but my entire system is heavily reliant on this close price. So, any assistance on this issue would be immensely helpful and appreciated. Thank you.