assetList error

Posted By: 7th_zorro

assetList error - 11/22/21 01:10

When using assetList function, if LOOKBACK history(t6) file of specific asset does not exist, zorro don't try to load further assets in the asset list.
for example, when specify one year backtesting as follow,

StartDate = 20200101;
EndDate = 20201231;
BarPeriod = 1440;
LookBack = 30;
...
if(Init) {
History = HISTORY_PATH;
assetList(ASSETS_LIST_PATH, 0);
}
...

Lookback period is 20191201 ~ 20191231.
BUT if there is no t6 file of specific asset exist, (****_2019.t6)
assetList generate error, and does not try to load further asset list, as a result there is missing assets.

I think even if some assets not have enough history data, they must not casuse other assets not loading correctly.

Please fix this problem.
Posted By: jcl

Re: assetList error - 11/23/21 10:00

assetList() loads no t6 files. It loads an asset list.
Posted By: 7th_zorro

Re: assetList error - 11/23/21 23:52

OK. Then, while asset loop may cause the problem,

...
while (asset(loop(Assets)))
{

}
...

while loop breaks when specific asset does not have lookback history file, it causes other assets not loading properly.




Posted By: jcl

Re: assetList error - 11/24/21 06:49

That's programming: the computer does what you tell it to do.

I am sure you can fix it. Look up 'while()' in a C book.
Posted By: 7th_zorro

Re: assetList error - 11/24/21 13:52

I can fix it.

while(asset(loop(Asset))) is one of main examples zorro suggest,

just suprised at some unexpected results.
© 2024 lite-C Forums