I have some problem during optimization using remote agent.

 

i have build 2 server and setup agent in it ,they have running a period of time .

Today i got this message from one of the server:

2013.06.14 16:51:45 server1 pass 3540 tested with error "no memory in OnTick function (cannot get 4096 Kb, used 1947 Mb)" in 2390 ms

...

(there are a lot of them)

and the agent skip the task quickly,return no result . 

 I do optimization using all the agent ,with 2 server, in the same time.

The other server is function properly.

 

 

someone tell me what's the problem???  

 
xhxiang:

i have build 2 server and setup agent in it ,they have running a period of time .

Today i got this message from one of the server:

2013.06.14 16:51:45 server1 pass 3540 tested with error "no memory in OnTick function (cannot get 4096 Kb, used 1947 Mb)" in 2390 ms

...

(there are a lot of them)

and the agent skip the task quickly,return no result . 

 I do optimization using all the agent ,with 2 server, in the same time.

The other server is function properly.

 

 

someone tell me what's the problem???  

Which MT5 build are you using ? Can you post a screenshot and full logs of your issue ? It may also useful to post your OnTick function code.
 

I am getting this error as well

 

 2013.06.24 14:13:16 Core 1 genetic pass (4, 284) tested with error "no memory in OnTick function (cannot get 237552 Kb, used 659 Mb)" in 351 sec

 

for both instances of when the server is online and when it is offline. MT5 build is 821, am using 1 minute OHLC. When I use open prices in higher time framws I do not get these errors.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5
 
ssn:

I am getting this error as well

 

 2013.06.24 14:13:16 Core 1 genetic pass (4, 284) tested with error "no memory in OnTick function (cannot get 237552 Kb, used 659 Mb)" in 351 sec

 

for both instances of when the server is online and when it is offline. MT5 build is 821, am using 1 minute OHLC. When I use open prices in higher time framws I do not get these errors.

Resolved this. 
 
ssn:
Resolved this. 
How ?
 

I found this problem using mt5 build 821 ,and if using previous build version(801?803?805?),no error reported. ... same as test agent.

 

and i have build a EA using a dynamic period strategy  ,when OnTick function call , delete the exciting indicator handle ,and create a new one. just like the code bellow :

the ea build and run with no error in mt5 bulid 80x(i forget the version)

and yesterday the mt5  update to  new version 821, i do back testing and get this error log:

OH 3 14:30:06 Core 1 4194304 bytes not available
ES 3 14:30:06 Core 1 stopped on 5% of testing interval
HD 3 14:30:06 Core 1 too low available memory, 1938 Mb used
HS 0 14:30:06 Core 1 log file "C:\Users\Administrator\AppData\Roaming\MetaQuotes\Tester\724633298821BFD94415AF2F4193F192\Agent-127.0.0.1-3000\logs\20130628.log" written
RN 0 14:30:06 Core 1 connection closed

this ea can run in live test,i can not do  back testing or optimization any more .

it run  properly in older version mt5 , i think there is something different in memory management in build 821.

 

and how can i do now ?????

 

 

comment : the "m_ma_period" will change by some market condition....

      if(m_handle_ema==INVALID_HANDLE)
        {
         if((m_handle_ema=iMA(NULL,PERIOD_CURRENT,m_ma_period,0,MODE_EMA,PRICE_CLOSE))==INVALID_HANDLE)
           {
            printf("Error creating EMA indicator");
            return(false);
           }
         m_last_std=m_buffer_std[1];
         printf("----m_ma_period = %d , m_last_std = %f",m_ma_period,m_last_std);
        }
      else
        {
         if(IndicatorRelease(m_handle_ema))
           {
            if((m_handle_ema=iMA(NULL,PERIOD_CURRENT,m_ma_period,0,MODE_EMA,PRICE_CLOSE))==INVALID_HANDLE)
              {
               printf("Error creating EMA indicator");
               
               return(false);
              }
            m_last_std=m_buffer_std[1];
            printf("----m_ma_period = %d , m_last_std = %f",m_ma_period,m_last_std);
           }
         else
           {
            printf("error releasing indicator ema! code = %d",GetLastError());
            return(false);
           }
        }
 
angevoyageur:
How ?
I think this problem may be to do with RAM but any ways I updated the way I detect a new bar and this seems to have solved it.
 
xhxiang:

I found this problem using mt5 build 821 ,and if using previous build version(801?803?805?),no error reported. ... same as test agent.

 

and i have build a EA using a dynamic period strategy  ,when OnTick function call , delete the exciting indicator handle ,and create a new one. just like the code bellow :

the ea build and run with no error in mt5 bulid 80x(i forget the version)

and yesterday the mt5  update to  new version 821, i do back testing and get this error log:

OH 3 14:30:06 Core 1 4194304 bytes not available
ES 3 14:30:06 Core 1 stopped on 5% of testing interval
HD 3 14:30:06 Core 1 too low available memory, 1938 Mb used
HS 0 14:30:06 Core 1 log file "C:\Users\Administrator\AppData\Roaming\MetaQuotes\Tester\724633298821BFD94415AF2F4193F192\Agent-127.0.0.1-3000\logs\20130628.log" written
RN 0 14:30:06 Core 1 connection closed

this ea can run in live test,i can not do  back testing or optimization any more .

it run  properly in older version mt5 , i think there is something different in memory management in build 821.

 

and how can i do now ?????

 

 

comment : the "m_ma_period" will change by some market condition....

Seems you are using too much memory, if you post your code we can try to help you, otherwise you have to write to ServiceDesk.
Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
 
angevoyageur:
Seems you are using too much memory, if you post your code we can try to help you, otherwise you have to write to ServiceDesk.
Is there some other way to modify an exciting indicator's parameters except for deleting and recreating it?
 
xhxiang:
Is there some other way to modify an exciting indicator's parameters except for deleting and recreating it?
I don't think so, but seems you are using IndicatorRelease(), that should be good.
Documentation on MQL5: Timeseries and Indicators Access / IndicatorRelease
Documentation on MQL5: Timeseries and Indicators Access / IndicatorRelease
  • www.mql5.com
Timeseries and Indicators Access / IndicatorRelease - Documentation on MQL5
 
I have wrote this problem to ServiceDesk.
Reason: