Why would an ongoing optimization stop by itself and give "Optimization stopped due to a fatal error in the EA" ??

 

Hi,

 

Im receiving the following error during pass 5++(more than 500) on my ea.  

 "Optimization stopped due to a fatal error in the EA"

 

Im thinking that one of the parameters from the optimization is forcing a zero divide on the program... 

 What else could it be?

 

 

Thanks 

 
Can't tell you anything due to the information you gave us...
 
investguy: Im thinking that one of the parameters from the optimization is forcing a zero divide on the program... 
Divide by zero is the reason. Parameters are irrelevant. What happens if Open==Close
 

I'll change my question... is there a way to know the CURRENT(before being displayed on the results) optimization pass settings??

 

Thanks 

 
WHRoeder:
Divide by zero is the reason. Parameters are irrelevant.

Due to the current parameter tested? Why it didnt give a error on the first pass ? 

thanks 

 

Hi,

 So far i have isolated the one setting that is giving me a hard time, in order to do that.

1) testing with open prices only i selected a weekly period of time at a time util i got to the day it give me the error

2) unselecting the variables to optimize i got to the ones that matter 

3) unselected the genetic optimization option.

 

With those settings in hand...

 

Testing the ea will NOT give me an Zero Divide Error. The ea just hangs.

Could it be a logical loop now??

 

Found the solution...

 

The optimization stopped due to the price being equal to opening price of a pending order... here is the solution:

if(BuyOnly)
           {
            if(Ask<ma) ticket=open(OP_BUYSTOP,ilots,ma,stoploss,takeprofit,expire,Blue);
            else if(Ask>ma) ticket=open(OP_BUYLIMIT,ilots,ma,stoploss,takeprofit,expire,Blue);
            else if(Ask==ma)ticket=open(OP_BUY,ilots,ma,stoploss,takeprofit,expire,Blue);
           }
         else
         if(SellOnly)
           {
            if(Bid>ma) ticket=open(OP_SELLSTOP,ilots,ma,stoploss,takeprofit,expire,Red);
            else if(Bid<ma) ticket=open(OP_SELLLIMIT,ilots,ma,stoploss,takeprofit,expire,Red);
            else if(Bid==ma) ticket=open(OP_SELL,ilots,ma,stoploss,takeprofit,expire,Red);
           }
         else
           {

 

 

Thank you all who helped! 

Reason: