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
3 registered members (AndrewAMD, TipmyPip, Edgar_Herrera), 804 guests, and 4 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
objective function returning wrong values #483260
05/13/21 10:12
05/13/21 10:12
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline OP
Newbie
anissyo  Offline OP
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
Hello every body, some times i just want to hit my head against the wall be cause of some features that i just can't figure out:

here is my problems and thnk's in advance for your response :
1) when i use WinTotal/LossTotal the value is some time >1 when the system is losing a tons of money

2) for debugging purposes i try to get dollard amount of WinTotal and LossTotal but there is no way to get it, all i get is some weird numbers like this : '0.01' or '0.04' or '0.02' i guess it's the result of a ratio but there is nothing on the docs explaning what this ratio is ...

3) here is my objective function that return value supérior to 1 when the system is massively losing money when backtesting :

Code
var objective()
{
	return WinTotal /LossTotal;
}

Last edited by anissyo; 05/13/21 10:16.
Re: objective function returning wrong values [Re: anissyo] #483261
05/13/21 11:04
05/13/21 11:04
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline OP
Newbie
anissyo  Offline OP
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
after futher digging i found this sentence : "In [Train] mode the parameters are based on trades with 1 lot, including phantom trades." in the documentation, so if i understund well the results of WinTotal and WinTotal are arround '0.01' be cause all the trades are oppened with lot=1 (my lotAmount and PIPcost are extremely tight to allow a precise calculation of trade size), i think it's not an accurate way to train a strategy ... if the train mode dont repesct the money management then it's useless, i really appreciate if any one can correct my undestrunding or point me to a direction to allow the traine mode to use the Risk parameter

Last edited by anissyo; 05/13/21 11:15.
Re: objective function returning wrong values [Re: anissyo] #483295
05/17/21 07:11
05/17/21 07:11
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Believe me, you don't want to "respect the money management" when training strategy parameters. But if you still feel the urge, dig further in the manual and you'll find out how to do that at your own risk.

Re: objective function returning wrong values [Re: anissyo] #483363
05/25/21 02:30
05/25/21 02:30
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline OP
Newbie
anissyo  Offline OP
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
thank's for the advice JCL

I have one question please, i use this objective function :

Code

var objective()
{

print(TO_LOG," NumWinTotal+NumLossTotal : ");
print(TO_LOG,sftoa (NumWinTotal+NumLossTotal, 6));

	return NumWinTotal+NumLossTotal;
}





i get two different values beetween the lines i get in zorro when optimizing and in the text_log, the values in the test log are correct it's the exact number of trades but when trainning i get different result on the window of zorro where the objective resuts are showing

thank's in advance

Last edited by anissyo; 05/25/21 02:45.
Re: objective function returning wrong values [Re: anissyo] #483366
05/25/21 03:58
05/25/21 03:58
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline OP
Newbie
anissyo  Offline OP
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
FINALLY !! i get it : "In [Train] mode, trades always open 1 lot, phantom trades are converted to normal trades, and MaxLong/MaxShort have no effect."

i found this on the manuel, i think it's better for me to keep it this way, it's very clever to ignore MaxLong/MaxShort, it's a robust way of doing trainning.

i was having different result be cause multiple trades are oppened in training but not when i click test


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1