Optimizing strange behaviour

Posted By: tomaslolo

Optimizing strange behaviour - 11/08/21 17:49

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
Posted By: tomaslolo

Re: Optimizing strange behaviour - 11/08/21 17:53

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
Posted By: AndrewAMD

Re: Optimizing strange behaviour - 11/08/21 19:16

Post your script.
Posted By: tomaslolo

Re: Optimizing strange behaviour - 11/09/21 00:03

Attached strategy, .par file and assetlist.

thank you

Attached File
miBar.zip  (53 downloads)
Posted By: Grant

Re: Optimizing strange behaviour - 11/09/21 07:04

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.
Posted By: tomaslolo

Re: Optimizing strange behaviour - 11/10/21 18:51

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.
© 2024 lite-C Forums