Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (dBc), 17,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
assetList error #484624
11/22/21 01:10
11/22/21 01:10
Joined: Oct 2018
Posts: 98
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 98
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.

Last edited by 7th_zorro; 11/22/21 01:16.
Re: assetList error [Re: 7th_zorro] #484638
11/23/21 10:00
11/23/21 10:00
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
assetList() loads no t6 files. It loads an asset list.

Re: assetList error [Re: 7th_zorro] #484644
11/23/21 23:52
11/23/21 23:52
Joined: Oct 2018
Posts: 98
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 98
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.





Last edited by 7th_zorro; 11/24/21 01:07.
Re: assetList error [Re: 7th_zorro] #484645
11/24/21 06:49
11/24/21 06:49
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
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.

Re: assetList error [Re: 7th_zorro] #484655
11/24/21 13:52
11/24/21 13:52
Joined: Oct 2018
Posts: 98
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 98
I can fix it.

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

just suprised at some unexpected results.

Last edited by 7th_zorro; 11/24/21 15:35.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1