OptimizerSetEngine doubt

Hi everyone,
I just discovered another incredible Amibroker feature: Non-Exhaustive Smart Optimization. I can't stop being amazed by AmiBroker!

I ran it for the first time, and Amibroker stopped like this, as you can see in the image. It seems to indicate that it's finished, but on the other hand, it says: running.

What should I do? Should I keep waiting, or did I do something wrong?

Thank you very much.

Is this happening to anyone else?
In Task Manager, I see that it's using the CPU, and I think that's good.
But the strange thing is that AMi says it's already finished.
Screenshot_115

I had this situation long time ago.
In my case I was using a data plugin that had problem with a non exisiting symbol.
But the problem happened also in explorer , not necessaryly during optimization

Try changing to local database and see if happens

Thanks so much for your help, awilson.

I use ABNorgateData, and I don't understand how to switch to the Local Database (sorry, I'm not very good at these things).

With NON-exhaustive optimization the total number of "steps" is UNKNOWN, therefore progress bar is showing estimate that is guessed, because to provide exact value you would need to know exactly how many steps there are in total but it is unknown. SMART optimization ends when optimizer reaches termination criteria
which usually is some form of convergence to the maximum.
If CPU is busy and new lines ARE ADDED to the optimization result it means that optimization still runs.
You did not provide the formula that you are using but chances are that the reason for incorrect estimation is your formula (Optimize() statements and/or smart optimizer settings set by OptimizeSetOption).

YOU NEED TO ALWAYS include the formula if you ask questions.

Also you did not tell what VERSION you are using, what optimization is that (portfolio or individual), why does your formula produce NO trades at all at certain stage (those "nan(ind").

Sorry, Tomasz, I shouldn't make those mistakes anymore; I'm not that new to it :wink:
My version: 6.93.0
I'm attaching the AFL:

_SECTION_BEGIN("Sistema3");

//TIPO DE SISTEMA
SetBacktestMode(BacktestRegular);
OptimizerSetEngine("cmae"); 

//OPTIMIZACIONES
//Número de Posiciones
NumPos =Optimize("NumPos",1,1,5,1);

//Valores N (ROC Rápido) y M (ROC Lento)
N=Optimize("N",8,1,12,1);
M=Optimize("M",10,1,12,1);

//Ponderaciones ROC Rápido, ROC Lento y Volatilidad
Pond_R=Optimize("Pond_R",0.4,0.1,1,0.1);
Pond_L=Optimize("Pond_L",0.2,0.1,1,0.1);
Pond_J=Optimize("Pond_J",0.4,0.1,1,0.1);

//Periodo para Volatilidad
J=Optimize("J",14,1,50,1);

//Corte
Corte=Optimize("Corte",0,0,100,10);

// Condición de exclusión (combinaciones inválidas)
epsilon=0.0001;
Exclude = (N > M) OR abs((Pond_R + Pond_L + Pond_J) - 1) > epsilon;

//SETTINGS
SetOption("InitialEquity", 1000000 );
SetOption ("MaxOpenPositions", NumPos);
SetOption ("AllowPositionShrinking", True);
SetOption("CommissionMode", 2);
SetOption( "CommissionAmount", 0.5 ); 
SetOption("MinShares",1);
SetOption( "AllowSameBarExit", True ); 
SetOption( "ReverseSignalForcesExit", True );
SetTradeDelays(1,1,1,1);
RoundLotSize = 1;
SetPositionSize (100/NumPos, spsPercentOfEquity);
Buy = Sell = Short=Cover=0;
BuyPrice = Open;
SellPrice = Open;
IAOK = IANOK =0;

//CÁLCULO INDICADORES
ROC_rapido = ROC (C,N);
ROC_lento = ROC (C,M);
F1 = ROC_rapido + ROC_lento;
ATRvol = ATR (J);
F2 = ATRvol/MA(C,J);
InerciaAlcista = F1/F2;

//REGLAS DEL SISTEMA
//Entrada
IAOK = InerciaAlcista>Corte;
Buysetup = IAOK;
Buy = Buysetup;

//Salida
IANOK =  InerciaAlcista<=Corte;
Sellsetup = IANOK;
Sell = Sellsetup;

//Para Desempate
PositionScore = IIf(Buy ==1, InerciaAlcista, -InerciaAlcista);

//Eliminar Señales Repetidas
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

_SECTION_END();

As I indicated at the beginning, when running the optimization on this code, on one side it says Running and on the other it says 100% complete, remaining 0 sec.

I'm also aware that OptimizerSetEngine("cmae") doesn't take the Exclude function into account, but I don't know how to do it to avoid the combinations I don't want.

Does it continue to ADD new rows?

Did you try with SPSO optimizer?
The thing is that CMAE likes dense or better yet continuous spaces. It doesn't like highly discrete spaces with only few "steps" in each direction.

YEs Dr. Tomasz, it continue to ADD new rows.
But it seems to be finally working. I just had to wait a little longer.
Thank you very much.