Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, monk12, TipmyPip, Quad, aliswee), 1,029 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Training strategy - errors #482191
01/09/21 12:11
01/09/21 12:11
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
Hi,

I have a problem training a strategy.
Have 2 variables to optimize. Code looks like this:


DataSplit = 80; // 80% training, 20% test
NumWFOCycles = 10; // 10 cycles

var openLoss = optimize(30,10,50,10); // Used in entry condition
var StopLoss = optimize(2,2,10,2)*ATR(25);
Trail = 2*StopLoss;

At the end of first walk loop (cycle) getting:

Walk[1] Bar 368..6156
......

Loop[1] 23: 30.00 10.00 => 0.02 45/17
Loop[1] 24: 40.00 10.00 => 0.01 22/11
Loop[1] 25: 50.00 10.00 => 0.01 15/ 7
SPX500: 10 2=> 0.064

Parameters stored in KDFlow1.1_1.par

Error 044: Data\KDFlow1.1_2.par no content

Walk[2] Bar 1907..6156

Loop[1] 1: 10.00 2.00 => 0.06 77/34
Loop[1] 2: 20.00 2.00 => 0.03 39/19
......
Loop[1] 24: 40.00 10.00 => 0.02 23/ 9
Loop[1] 25: 50.00 10.00 => 0.01 9/ 6
SPX500: 10 2=> 0.057

Error 062: Can't open KDFlow1.1_2.par (wt:13)

I am running Zorro as admin.

Why there is no content after first cycle (Error 044) ?
I suppose Error 062 is caused by previous error ?


Training only one asset at the moment.

while(asset(loop("SPX500")))
{}



Thanks,

Neb




Last edited by Neb; 01/09/21 12:14.
Re: Training strategy - errors [Re: Neb] #482214
01/12/21 19:02
01/12/21 19:02
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
Any hint, anyone ?

Re: Training strategy - errors [Re: Neb] #482245
01/16/21 12:53
01/16/21 12:53
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
I dont know if thats the reason but never ever use a file name with a "1.1" in it because the dot in Windows file names is for the file extension.

Re: Training strategy - errors [Re: Petra] #482250
01/17/21 01:39
01/17/21 01:39
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
Thanks Petra,

Will try it.
I've just renamed file and rerun training.
Will see soon laugh

Regards,

Neb

Re: Training strategy - errors [Re: Neb] #482251
01/17/21 02:42
01/17/21 02:42
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
Hm,

I am getting now this:

Loop[3] 99: 40.00 10.00 0.80 => 0.00 0/ 5
Loop[3] 100: 50.00 10.00 0.80 => 0.00 0/ 5
XAU/USD: 50 10 0.800=> 0.000

Parameters stored in KDFlow1_1.par


Time 01:02:04

KDFlow1_1 compiling................
Error 062: Can't open KDFlow1_1_NAS100_1.par (rt:2)
Error 044: Data\KDFlow1_1_NAS100_1.par not trained


During training, I saw it was doing loop for every of the asset.



Question: Can I train all assets together (3 of them) or I need to do it separately ?

I got 9 files:

KDFlow1_1_1.par to KDFlow1_1_9.par
Neither of them have asset in name.
Why it is asking me name now when I try to run test ?

Thanks,

Neb

Re: Training strategy - errors [Re: Neb] #482252
01/17/21 02:47
01/17/21 02:47
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
Ok.

Repeated training only for one asset -> "NAS100".

Got similar message when I try to run test:


Time 00:01:19

KDFlow1_1 compiling...............
Error 062: Can't open KDFlow1_1_NAS100_1.par (rt:2)
Error 044: Data\KDFlow1_1_NAS100_1.par not trained


What I am missing ?

Thanks,

Neb

Re: Training strategy - errors [Re: Neb] #482253
01/17/21 02:59
01/17/21 02:59
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
hm,

One more interesting thing.
I found that instead of picking up assets from the script, when I click test, seems it is picking up from drop down menu ?
Why is that when I am doing while loop inside script ?

while(asset(loop("NAS100","SPX500","XAU/USD")))
{

if((condition A) and (Condition B) and (Condition C))
{
.....


Completely the same script, when I comment

set(PARAMETERS);

and replace optimize with values, do test properly with all assets from the loop.


Thanks,

N.

Last edited by Neb; 01/17/21 03:14.
Re: Training strategy - errors [Re: Neb] #482254
01/17/21 10:26
01/17/21 10:26
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
You must select an asset before optimizing its parameters, not afterwards. Otherwise it takes the asset from the scrollbox and that is probably not the asset you want to optimize.

All about optimizing is in the tutorial, you can see in workshop 6 how to code a script for multi asset optimization.

Re: Training strategy - errors [Re: Neb] #482255
01/17/21 13:02
01/17/21 13:02
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London

Thanks @Petra !

I moved all what I could to trade function (Like in W6) and with calling function inside assets loop
all works like it should.
I don't know what I should do without you and @AndrewAMD!

Both of you rocks !

Regards,

Neb

Re: Training strategy - errors [Re: Neb] #482256
01/17/21 14:57
01/17/21 14:57
Joined: Aug 2020
Posts: 59
London
Neb Offline OP
Junior Member
Neb  Offline OP
Junior Member

Joined: Aug 2020
Posts: 59
London
Hi again,

After I updated code, moved entry logic into separate function and calling that function now inside "while asset loop",
wanted to check if i am getting same stats for previous code and this new one.
I should be getting similar, I supposed so, cause parameters are the same.
And to be on the safe side, checked both codes:

1) NAS100 only - same result
2) NAS100 & SPX500 - same result
3) NAS100, SPX500 & XAU/USD - different results -> different number of trades and all the following

So, more checking and debugging, but I wonder how is that possible that is not different for 1 and 2 assets, but with 3 is ? frown

Neb

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1