Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 781 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro fails to name parameter files correctly with my asset list #485590
03/28/22 16:25
03/28/22 16:25
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I'm doing multicore WFO training and for reasons I cannot figure out, Zorro in some circumstances fails to append the correct asset name from the drop-down selection to the .par file, crashing the Test run when Zorro doesn't find the parameter file it needs.

I can recreate it consistently with the below code example and the attached asset list.
Code
function run(){
	LookBack = 200;
	set(PARAMETERS,TESTNOW,PLOTNOW);
	NumCores = 10;
	NumWFOCycles = 10;
	
	assetList("AssetsFXView");
	
	var* Close = series(priceClose());
	var* sma = series(SMA(Close, optimize(100,50,200,50)));
	if(peak(sma)){
		enterShort();
	}
	if(valley(sma)){
		enterLong();
	}
}


Steps: Select EUR/USD from the selection box, train the script and it will work as expected. Then select EUR/GBP and train again, the subsequent test run fails on my end. Zorro looks for .par files that weren't created because it saved the trained parameters under the *old* asset name EUR/USD instead of the currently selected.

- Disabling multicore training also gets rid of the error and the training works correctly again. So it must be related to that somehow.
- I can't recreate the error with any pair of assets but the above listed EUR/USD and EUR/GBP always fail for instance, but there are other examples.
- I cannot replicate the behavior with the default asset lists I've tried so far. I can't see anything wrong with the attached list though. I've been using it without issue for other purposes.
- Looking in the Data folder, I can see that Zorro correctly saves the first .par file with _1 in it, but the subsequent ones are saved under the wrong asset name.

Attached Files
AssetsFXView.csv (53 downloads)
Last edited by MegaTanker; 03/28/22 16:26.
Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485594
03/29/22 07:15
03/29/22 07:15
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Select the asset before calling optimize. Otherwise it will use the current selected asset. If none is selected because you just loaded a new asset list, the asset is undefined.

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485597
03/29/22 08:40
03/29/22 08:40
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I tried doing a manual asset(Asset) call, which makes Zorro save the .par files without asset names. But then I get errors "no xxx parameter at walk x" and when I look inside the .par files, the component name is wrong. Just like the behavior above, it has the correct component name in the first walk file only, but the other ones all still contain the initial wrong asset.

It's not that the asset is undefined, because it names the first file correctly always.

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485600
03/29/22 12:00
03/29/22 12:00
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Yes, asset(Asset) will not help of course when the old asset was unselected by loading a new list. assetList("MyList",Asset) will do the trick. Or simply asset("EUR/USD").

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485603
03/29/22 13:55
03/29/22 13:55
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Trying assetList("AssetsFXView", Asset) produces even stranger behavior, it still prints "no xxx parameter at walk x" for all but he first walk and when I look inside the .par files the components there are a number of different currency pairs with no rhyme or reason I can figure out. It seems to cycle through assets.

Setting the asset per script would work for sure, but then I'd lose the convenient asset selection feature through the drop down list

Edit: Ok, ignore the cycle part, I forgot to remove the asset(Asset)

Last edited by MegaTanker; 03/29/22 14:09.
Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485604
03/29/22 14:12
03/29/22 14:12
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Interesting update: Adding the second asset (EUR/GBP f.i.) to AssetsFix fixes the problem. The created threads somehow reference AssetsFix despite the script setting a custom list. And they reject the selected asset if it's not in AssetsFix. I think it's a bug.

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485605
03/29/22 15:42
03/29/22 15:42
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Threads accept asset lists. They must, otherwise you could never optimize most assets.

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485607
03/29/22 16:42
03/29/22 16:42
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Should be easy enough to try with the above code snippet and Asset list. Simply launch zorro, hit test so the asset list is loaded, then switch to EUR/GBP or any other asset that is not in your AssetsFix and then hit train. This always fails for me.

If I add EUR/GBP to AssetsFix, it works.

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485608
03/30/22 10:38
03/30/22 10:38
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
If cannot work with the above code snippted because no asset was selected as I explained above. Have you fixed that and it still does not work?

Re: Zorro fails to name parameter files correctly with my asset list [Re: MegaTanker] #485609
03/30/22 12:33
03/30/22 12:33
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I don't know what you mean by that. If there is no asset() call in the script, Zorro uses the one selected in the selection box, no? An asset() call by script will override this selection but that's not what I want to do


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1