Optimization : no memory in OnTick function

 

Hi,

I was working on an EA that cross currencies. I wanted to optimized it. On 1 week it's possible but not reliable enough, on 1 year it's slow, & shows this error : 

2014.12.12 01:57:45    MQL5 Cloud Europe    genetic pass (0, 37) tested with error "no memory in OnTick function (cannot get 960 Kb, used 0 Mb)" in 140 ms (PR 137)
2014.12.12 01:57:45    MQL5 Cloud Europe    genetic pass (0, 69) tested with error "no memory in OnTick function (cannot get 4096 Kb, used 0 Mb)" in 31 ms (PR 137)
2014.12.12 01:57:45    MQL5 Cloud Europe    genetic pass (0, 130) tested with error "no memory in OnTick function (cannot get 5376 Kb, used 0 Mb)" in 78 ms (PR 137)
2014.12.12 01:57:45    MQL5 Cloud Europe    genetic pass (0, 61) tested with error "no memory in OnTick function (cannot get 4096 Kb, used 0 Mb)" in 32 ms (PR 137)

 I looked on the forums for this common error, but the EA doesn't use any indicators. So I'll be glad if there's any solution to decrease memory usage.

Thanks for your help.

(EDIT : i've already wrote to the service desk, yet no answers :) )

 

Using ZeroMemory after each method didn't solve the problem.

2014.12.12 09:20:28     MQL5 Cloud Europe       genetic pass (0, 8) tested with error "no memory in OnTick function (cannot get 5760 Kb, used 0 Mb)" in 90 sec (PR 115)
 
I have ZeroMemory quite all the var, and ArrayFree all the arrays. What then ?