Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Optimizing strange behaviour #484529
11/08/21 17:49
11/08/21 17:49
Joined: Feb 2018
Posts: 68
T
tomaslolo Offline OP
Junior Member
tomaslolo  Offline OP
Junior Member
T

Joined: Feb 2018
Posts: 68
Hello, I´m optimizing a strategy with set(PARAMETERS) and training on CHF/JPY pair.
Code
asset("CHF/JPY");

Zorro S 2.40.9 . When training is finished, a .par file is stored in Data folder. All ok.

When testing Zorro looks for the par file, but has to be named finished witd the curreny pair. For example if train with CHF/JPY, Zorro looks for "strategyname_CHFJPY.par" file but Zorro does not store the file with currency pair at the end. You can manually rename the par file and then zorro opens the file and tests the strategy.

But now, there are some errors. Seems to try to test in another currency pair AUD/CHF

Quote
miBergantin1 compiling...........
Read miBergantin1_CHFJPY.par
Test: miBergantin1 CHF/JPY 2015..2020
Assets AssetsDarwinexFMB
Error 015: trade [AUD/CHF::L98850] bad exit price 0.0000
Loss -37.35$ MI -0.61$ DD 37.35$ Capital 35.69$
Trades 249 Win 0.0% Avg -1.5p Bars 1
AR -21% PF 0.00 SR 0.00 UI 0% R2 0.98


The par file content is:
Quote
CHF/JPY 6.01 2.88=> 1.448


And the AssetList includes CHF/JPY pair
Quote
Name Price Spread RollLong RollShort PIP PIPCost MarginCost Leverage LotAmount Commission Symbol
CHF/JPY 122.07 0.00024 -4.7 -1 0.01 10 0 100 1000 0.5 CHF/JPY


Can be a bug or am I doing anything wrong?

Thank you

Re: Optimizing strange behaviour [Re: tomaslolo] #484530
11/08/21 17:53
11/08/21 17:53
Joined: Feb 2018
Posts: 68
T
tomaslolo Offline OP
Junior Member
tomaslolo  Offline OP
Junior Member
T

Joined: Feb 2018
Posts: 68
I tried also with Zorro S 2.30.7 and same behaviour

Quote
miBergantin1 compiling...........
Read miBergantin1_CHFJPY.par
Test: miBergantin1 CHF/JPY 2015..2020
Assets AssetsDarwinexFMB
Error 015: trade [CAD/JPY::L98850] bad exit price 0.0000
Loss -52.29$ MI -0.86$ DD 52.29$ Capital 951$
Trades 249 Win 0.0% Avg -0.0p Bars 1
AR -1% PF 0.00 SR 0.00 UI 0% R2 0.98

Re: Optimizing strange behaviour [Re: tomaslolo] #484531
11/08/21 19:16
11/08/21 19:16
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Post your script.

Re: Optimizing strange behaviour [Re: tomaslolo] #484533
11/09/21 00:03
11/09/21 00:03
Joined: Feb 2018
Posts: 68
T
tomaslolo Offline OP
Junior Member
tomaslolo  Offline OP
Junior Member
T

Joined: Feb 2018
Posts: 68
Attached strategy, .par file and assetlist.

thank you

Attached Files
miBar.zip (53 downloads)
Re: Optimizing strange behaviour [Re: tomaslolo] #484534
11/09/21 07:04
11/09/21 07:04
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
The only asset you've defined in your script is the "CHF/JPY", so you need to select that one first in your drop down list.

Re: Optimizing strange behaviour [Re: tomaslolo] #484543
11/10/21 18:51
11/10/21 18:51
Joined: Feb 2018
Posts: 68
T
tomaslolo Offline OP
Junior Member
tomaslolo  Offline OP
Junior Member
T

Joined: Feb 2018
Posts: 68
Thank you both. optimize has to be placed after "asset" call.
Code
	assetList("AssetsDarwinexFMB");
	asset("CHF/JPY"); // GBP/USD
	Stop=optimize(3,1,10,1)*ATR(20);  // 6.01
	TakeProfit=optimize(3,1,10,1)*ATR(20); // 2.88

This way works fine.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1