Errors, bugs, questions - page 306

 
Jager:
If the builds are the same everywhere, try also deleting the tester\Agent-x.x.x.x-xxxxx\bases folders (on remote agents and local ones). It worked for me if I was optimizing on MQ quotes and the next one on A-ri quotes - sometimes the remote agents didn't want to start either.
 
notused:
If the builds are the same everywhere, try also deleting the tester\Agent-x.x.x.x-xxxxx\bases folders (on remote agents and local ones). It worked for me, if I ran optimization on MQ quotes, and the next one on A-ri quotes - sometimes the remote agents didn't want to run either.
If there are dozens of agents on different computers, it's not realistic. It's supposed to work without external intervention.
 

The auto-substitution of "uint" instead of "int" for the for snippet is a waste of time. Beginners often fall for such a trick:

for (uint i = 0; i < SomeObject.Count - 1; i++)

uint can be any unsigned integer

 
For some reason, quite often, after the optimiser finishes its work, the context menu bar "Run Single Test" is not active in the"Optimisation Results" tab and, correspondingly, left-clicking on the pass line will not start either.
 

Today I realised that making EA parameters dynamic

and it is impossible to combine the Expert Advisor and the indicator in one

...together.

Is there any way at all?

 
Im_hungry:

I realised today that it is not possible to make EA parameters dynamic in the EA, and it is not possible to combine an EA with an indicator in one. There is no way to do it at all?

You'd better describe not your conclusions, but the goals and objectives you are trying to achieve.

 
Yedelkin:

You'd better describe, not your conclusions, but the aims and objectives you're trying to achieve.

This is all correct, of course. Here is the task:

make the indicator parameter dynamic, when you close the position

We change one of the indicator parameters, that is the task.

Here is my solution:

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   vhandle=iCustom(NULL,0,"МТ5"); 
   if(vhandle<0)
     {
      Alert("Ошибка при создании индикаторов: ",GetLastError());
      return(-1);
     }
   return(0);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   IndicatorRelease(vhandle);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{ 
   if (isNewBar()==true)
     {
     ArraySetAsSeries(Sp1Buffer,true);
     ArraySetAsSeries(Sp2Buffer,true);
//----------------------
     vhandle=iCustom(NULL,0,"МТ5",Symbol1,100,Lots,Close());
     if(vhandle<0)
       {
        Alert("Ошибка при создании индиката: ",GetLastError());
       }
     if(CopyBuffer(vhandle,0,0,50,Sp1Buffer)<0 || CopyBuffer(vhandle,1,0,50,Sp2Buffer)<0)
       {
        Alert("Ошибка копирования буферов индикатора номер ошибки:",GetLastError());
       }
     }    
}
//+==================================================================+
int Close()
{
...
}


I can say that this code works because testing shows different results, but it's not clear

but it's hard to understand why it works so badly.

it freezes and gives the same values in the buffer, although it's impossible (2 weeks with the same values

If it doesn't loop, it just writes error:

message via Alert

Ошибка копирования буферов индикатора номер
 

Remote agents have stopped updating.

2011.02.19 21:15:01     Tester  tester agent VPN  20 lvlaxim is failed
2011.02.19 21:15:01     VPN  20 lvlaxim connect closed
2011.02.19 21:15:01     Tester  tester agent VPN  20 lvlaxim cannot synchronized
2011.02.19 21:14:00     VPN  20 lvlaxim Old build 392 of Tester Agent. Attempt to update.
2011.02.19 21:14:00     VPN  20 lvlaxim authorized (agent build 392)
2011.02.19 21:13:59     VPN  20 lvlaxim connected

2011.02.19 19:08:29     VPN  20 lvlaxim connect closed
2011.02.19 19:08:29     Tester  tester agent VPN  20 lvlaxim cannot synchronized
2011.02.19 19:07:28     VPN  20 lvlaxim Old build 392 of Tester Agent. Attempt to update.
2011.02.19 19:07:28     VPN  20 lvlaxim authorized (agent build 392)
 
Voodoo_King:

build 401.

1) It seems MT5 users will never wait for the developers to add one switch on the tester form and

write one line of code with an if condition... to avoid opening of the visualization window at every run

even though many users in this thread have asked for it many times many builds ago.

2) Please restore the output of remaining optimization time calculation in the full-size tester window (as it was in MT4).

I fully support it - maybe in servicedesk? (close it a hundred times).
 
notused:

The auto-substitution of "uint" instead of "int" for the for snippet is a waste of time. Beginners often fall for such a trick:

uint can be any unsigned integer

Thanks