Optimization Error: Expert file ...ex5 Open Error [2]

 

Good day, I got this error when running optimization, but this error does not occur when I run single test. This error did not affect the test results, but after a few thousand passes my log file was stuffed to tens of GB of data, which is very irritating.

I wrote the MACD indicator using Custom EMA (as resource) and used the MACD indicator as a resource for the EA (sorry for the unclear description).

Everything worked very well and no errors occurred (Indicator, single test EA) until I performed the optimization test. I'm using MT5 5.0 build 4153.

My custom MACD and real EMA.exe resource path:

#define COMPONENT_PATH          "\\Indicators\\Component\\MovingAverage\\"
#define MA_EMA_PATH             COMPONENT_PATH + "EMA.ex5"
#resource MA_EMA_PATH

...
handle = iCustom(_Symbol, _Period , MA_EMA_PATH, ... );

My iCustom MACD: 

#define MACDPath        "\\Indicators\\Duc\\FMACD.ex5"
#resource MACDPath

...
handleMACD = iCustom(_Symbol, _Period, MACDPath, ...);


 
Le Minh Duc:

Good day, I got this error when running optimization, but this error does not occur when I run single test. This error did not affect the test results, but after a few thousand passes my log file was stuffed to tens of GB of data, which is very irritating.

I wrote the MACD indicator using Custom EMA (as resource) and used the MACD indicator as a resource for the EA (sorry for the unclear description).

Everything worked very well and no errors occurred (Indicator, single test EA) until I performed the optimization test. I'm using MT5 5.0 build 4153.

My custom MACD and real EMA.exe resource path:

My iCustom MACD: 


try this

#resource "\\Indicators\\Component\\MovingAverage\\EMA.ex5"
.
.
.
handle = iCustom(_Symbol, _Period , "\\Indicators\\Component\\MovingAverage\\EMA.ex5", ... );

also correct for "iCustom MACD"


it works for me

 
Mahdi Ebrahimzadeh #:

try this

also correct for "iCustom MACD"


it works for me

Does not work for me. Actually define won't cause any problems, it's just an substitution method

 
Le Minh Duc #:

Does not work for me. Actually define won't cause any problems, it's just an substitution method

for me, call of define variables in OnInit will cause error

I never call those inside of OnInit