When I do this in run():

Code
LookBack = 200;
StartDate = Now;
asset("EURUSD");
BarPeriod = 1;
TimeFrame = 1;
vars Price = series(priceOpen());


I see this in Zorro terminal:

Code
...
Load EURUSD prices.. 600 min, gap 1378 min
Trade: testBarperiod EURUSD 2022-01-22
Lookback 200 bars, 2022-01-21..2022-01-21.
...


When I do this:
Code
LookBack = 200;
StartDate = Now;
asset("EURUSD");
BarPeriod = 1;
TimeFrame = 1000;   //!!!!
vars Price = series(priceOpen());


I see exactly the same in Zorro terminal:

Code
...
Load EURUSD prices.. 600 min, gap 1378 min
Trade: testBarperiod EURUSD 2022-01-22
Lookback 200 bars, 2022-01-21..2022-01-21.
...


It's impossible that 600 mins are enough since these are 1000 minutes bars, and I need 200 of them for LookBack. So LookBack is calculated only by BarPeriod, regardless of TimeFrame.

That's why I should do the LookBack in this case for proper operation:

Code
BarPeriod = 1;
LookBack = 1*1000*200 // It's just 200 when I switch to TimeFrame=1000;


...what I want to avoid because of startspeed and memory savings.
According to the code above, for my calulcations I only need:

- 200 bars of 1-minute
- 200 bars of 1000-minute

but this way I get 200,000 pieces of 1-minute, and calculate dynamically the 200 bars of 1000-minutes.

Last edited by NorbertSz; 01/22/22 21:16.