Bars.LoadMoreHistory();
Created at 07 Apr 2020, 18:04
Bars.LoadMoreHistory();
07 Apr 2020, 18:04
Hi, Thank you very much for reading my question .
Im wondering :
---------------------------------------------------------------
protected override void Initialize()
{
if (Bars.Count < 3500)
Bars.LoadMoreHistory();
...
}
What would happen if specific symbol + timeframe doesnt have this amount of bar
Thank you very much.
PanagiotisCharalampous
08 Apr 2020, 08:20
Hi 1222Ht,
Your question is not very clear. The if statement does not affect the number of bars to be loaded. If you want to load up to specific number of bars you need to use a while statement. However if the symbol does not contain that amount of bars, you will end up in an infinite loop. Therefore you need to implement the relevant check to break the loop when all bars have been loaded.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous