I found a possible workaround.

I am using a wrapper around the optimize() call that writes the parameter names, in call order, to a separate file:

Code

typedef struct ZINPUT_PARAM {
	var Value;
	var Min;
	var Max;
	var Step;
	bool OrderWritten;
} ZINPUT_PARAM;

...

static var resolveZInputParam(string Name, ZINPUT_PARAM* Param)
{
	if (!Param->OrderWritten) {
		file_append(OptimizeOrderFile, strf("%s\n", Name), 0);
		Param->OrderWritten = true;
	}

	return optimize(
		Name,
		Param->Value,
		Param->Min,
		Param->Max,
		Param->Step,
		0
	);
}



So when I get a .par file like this:

Code
EUR/USD,20,48,40,1.870


I also get a corresponding .order file like this:

Code
Param2
TrendPeriod
OtherSuperSecretParam


This lets me map the values in the .par file back to their corresponding parameters.
Is there a native Zorro function or mechanism for retrieving the order of the optimize() calls dynamically?

Last edited by NorbertSz; 08/25/26 22:08.