how to get history data beyond 7 days on multiple timeframe indicator
Created at 25 Feb 2025, 15:23
how to get history data beyond 7 days on multiple timeframe indicator
25 Feb 2025, 15:23
Hi Support,
I have an indicator which run on 5min chart. My logic need to GetBars on 2min and 1min timeframe. I just found that 1 min Bars had never get history data beyond last 7 days. I had tried to scroll 5min chart to the left (e.g. now Feb 205, I scroll to March 2024), but 1min Bars still loaded only 7 days from today. How can I call GetBars on 1min to get data beyond 7 days
regards
Noppanon
firemyst
26 Feb 2025, 01:47
Why don't you post some code demonstrating the problem and perhaps someone can see what you're doing and what needs to be corrected?
In a nutshell, when the history loads, check if the earlier bar loaded is before a certain date/time. IF not, you need to call load more history again.
If you Google, you'll see there's been a few threads in the forums talking about this:
/forum/cbot-support/38020/
/forum/indicator-support/24356/
And this page will have info assisting on how to load more history:
https:// help . ctrader . com /ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/
@firemyst