trend bar request, got missing data
trend bar request, got missing data
31 Jul 2023, 06:27
Hi, I am using ProtoOAGetTrendbarsReq to request 1 years historical data (period: M1) for my backtesting on EURUSD pair. So, I develop the callback functions to request the data in Python language. I request maximum number of bars that each request can do until I got all 1 years data. The code is below. But I got missing data on Monday and Tuesday for every weeks. So, I try to request only the period that cover Monday and Tuesday and does not exceed the request limit (try just one request), for example, 2022-07-02 to 2022-07-06. The data on Monday and Tuesday were not missing. Do you have any advice to solve this problem, or Could you recommend some best practice to collect 1 years data or more for cTrader Open API with Python?
This is the result from code above (many requests to collect 1 years data)
This is the result from one request to test.
Do not worry about 59 second. I added 59 seconds to be close time.
jamesgordon463
14 Mar 2024, 08:56 ( Updated at: 15 Mar 2024, 01:24 )
Hello @fnaf 2, I think instead of requesting the entire year's worth of data at once, you can modify your code to request data in smaller chunks, such as monthly or quarterly intervals. By doing this, you can specifically request data that covers the entire week, including Mondays and Tuesdays. This approach ensures that you capture all the necessary data without missing any days.
@jamesgordon463