# How does AlgoTest define a candle?
Author: AlgoTest
Author URL: https://algotest.in/blog/author/algotest/
Published: 2024-08-28
Category: Product
Category URL: https://algotest.in/blog/category/product/
URL: https://algotest.in/blog/how-does-algotest-define-a-candle/

We recently received an interesting query from a user, which relates to how does [AlgoTest](https://algotest.in/?utm_source=blog&utm_medium=internal&utm_campaign=seo&utm_content=main-page&utm_term=algotest) define a candle:

**_"On Friday ( 24th Feb 2022) Enter Straddle at 9.20 with 40% SL and Re-Enter ASAP 2 times"_**

![AlgoTest trade book](https://prod.superblogcdn.com/site_cuid_cmbhlz3q0002sxzc513a62pj5/images/66cf0055a40b60528e0442c1c3607a9c-6f94-4c94-a65e-c539eb9815c8algotestscreenshot-1749227331412-compressed.jpeg)

As you can see in the above picture, the CE stop loss is hit at 9:54am, and the CE leg is re-entered with a new strike at 9:54am (since the user has selected Re-enter ASAP) with a new strike price. The new entry price is Rs 617.95.

Now when the user checked the same 9:54am candle on Zerodha, they saw:

**_"But if I look at the Close Price of 36500 CE at 9.54 , its 586.45. Zerodha Close Price - 586.45 Algotest Close Price - 617.95"_**

![zerodha algotest candle image](https://prod.superblogcdn.com/site_cuid_cmbhlz3q0002sxzc513a62pj5/images/66cf0055a40b60528e0442bb21c3665b-98e6-413c-afd7-9b40d96ff59acandle-1749227331346-compressed.jpeg)

## So why the difference?

In Zerodha, the 9.15am candle refers to the time covering 9:15:00-9:15:59. How does AlgoTest define this candle? In [AlgoTest](https://algotest.in/?utm_source=blog&utm_medium=internal&utm_campaign=seo&utm_content=main-page&utm_term=algotest), this timespan refers to the 9.16 candle. So when we say 9:54am, the price you see on AlgoTest was Rs. 617.95, which corresponds to the close price of the 9:53 candle on Zerodha, which was Rs. 620, **a lot closer to the price you see on** [**AlgoTest**](https://algotest.in/?utm_source=blog&utm_medium=internal&utm_campaign=seo&utm_content=main-page&utm_term=algotest) **!**

Here is the screenshot of the zerodha candle

![second candle AlgoTest](https://prod.superblogcdn.com/site_cuid_cmbhlz3q0002sxzc513a62pj5/images/66cf0055a40b60528e0442a6f40765ae-6600-4d01-b14e-68eaf878e004candle2-1749227331321-compressed.jpeg)

_Q: O_ k, _now we know that the 9:19 candle in Zerodha corresponds to the 9:20 candle in_ [_AlgoTest_](https://algotest.in/?utm_source=blog&utm_medium=internal&utm_campaign=seo&utm_content=main-page&utm_term=algotest) _. What does that mean for my 9:20 straddle entry?_

**_Answer: Entry at 9:20am on AlgoTest will correspond to 9:19am candle close price on zerodha._**

_Q: Does this 1-second difference matter?_

**_Answer: If you are trading manually, or using broker API to trade, it doesn't._**

Hopefully, this gives you an idea of how data is represented on AlgoTest. Do check out our [**website**](https://algotest.in) to learn more about options trading in India and how we can improve our trading by backtesting!


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

