Error043 wrong parameter

Posted By: gamadeus

Error043 wrong parameter - 01/26/19 12:31

I often times get this strange "Error043: EUR/USD wrong parameter" when training a script, particularly during WFO cycles after training and on any asset.

It happens on completely unrelated intervals and sometimes goes away when I specify the asset in the script, sometimes not.

can somebody help me understand what that error is actually saying?
could it be caused by a corrupt history file?
Posted By: AndrewAMD

Re: Error043 wrong parameter - 01/26/19 14:08

Error codes are explained in the manual.

If you are still confused, post your code.
Posted By: gamadeus

Re: Error043 wrong parameter - 01/26/19 14:53

yes thanks, I should learn to do my research first before impulsively posting

it seems that the error is caused by the fact that one parameter is set at -1 in the par file. therefore I get the error every time I test the par files are read (like test or retraining)

this occurs when a ratio like PF is optimized and there are no losing trades in the best parameter of the training set, which can happen for short train cycles

here is my solution for the objective function, in case anyone might stumble upon the same problem:
if(!NumLossTotal)
{
if(NumWinTotal) return NumWinTotal;
return 0;
}
else
return ThisPerformance.vWin/abs(ThisPerformance.vLoss);


© 2024 lite-C Forums