Errors, bugs, questions - page 582

 
ivandurak:

Below is a script which should output the labels for the selected character, regardless of which character it is thrown on. However, it only outputs the labels when thrown on the same character. Plz need a nudge.


Instead of:

   CopyRates(Symbol(),0,0,10,price);

need

   CopyRates("EURUSD",0,0,10,price);
 
uncleVic:

Instead of:

need

Why doesn't it work with Symbol()?
 
tol64:
Why doesn't it work with Symbol()?

outputs the labels on the selected symbol, regardless of which symbol it is thrown on.

with Symbol() will take the one that is thrown.

 

Why does the ENUM_APPLIED_PRICE enumeration start with 1?

   ENUM_APPLIED_PRICE enm;
   for(int i=0;i<10;i++)
     {
      enm=i;
      Print(EnumToString(enm));
     }

result:

        ENUM_APPLIED_PRICE::9
        ENUM_APPLIED_PRICE::8
        PRICE_WEIGHTED
        PRICE_TYPICAL
        PRICE_MEDIAN
        PRICE_LOW
        PRICE_HIGH
        PRICE_OPEN
        PRICE_CLOSE
        ENUM_APPLIED_PRICE::0
 

What is the time returned by the TimeCurrent( ) function?

The help reads:

Returns the last known server time, the arrival time of the last quote by one of the selected symbols in Market Watch. In the OnTick() handler this function will return the time of the incoming tick to be processed. In other cases (for example, in the OnInit(), OnDeinit(), OnTimer() handlers and so on) this is the time of the last quote arrival for any symbol available in the "Market Watch" window, the same time as shown in the header of this window. The time value is generated on the trade server and does not depend on time settings of a user's PC.

The time of arrival of the last quote for any symbol - it may be significantly different for different symbols from- especially for those, for which the trades are closed))

If you look at the market overview - MQL server (the image is taken today):


We see the time 15:22:42 - it does not correspond to any of the symbols. Maybe something needs to be tweaked on the server?

 

Gentlemen MQ has a small suggestion:

When optimizing an EA, you may accidentally close the terminal. Is it possible to make a confirmation to close.

For those who do not need it make a flag in the settings of the tester.

I hope other MT users will support me. It's a shame when a few days of work goes down the drain and you have to start all over again.

 
vdv2001:

Gentlemen MQ has a small suggestion:

When optimizing an EA, you may accidentally close the terminal. Is it possible to make it so that the confirmation of closing is required.

For those who do not need it make a flag in the settings of the tester.

I hope other MT users will support me. It's a shame when a few days of work goes down the drain and you have to start all over again.

And there is also a loss of contact in the mains switch (you never know how many problems the end user has). In general, the problem has to be broadened,

Make an intermediate autosave of tester's internal data (you know, the last population),

so that it (the tester) could continue searching from the last saved point on a new start.

HZZ This feature has long been tested on games (rare game can be passed regularly without saving) and justifies itself quite well. So it wouldn't be a new model of the bike.

 

With all due respect, please explain the problem. Imho, the problem is not in the skier and not in the asphalt, skis remain. How is it possible that the cycle becomes infinite? Or kick in the direction of the ski.

class proba
  {
   private:
      int   Nambe;
   public:
       void     Init(){Nambe=10 ;};
       void     Vedenie() {Nambe--  ;};
       bool     Start(){if (Nambe >0) return(true); return(false) ;};        
  };
//=========================================================================
proba cikl;
void OnStart()
  {
      cikl.Init();
      while(cikl.Start())
        {
         cikl.Vedenie() ;
         Print(" Функция старт вернула ",cikl.Start());
        }
  }
 

If you correct the class text like this:

class proba
  {
   private:
      int   Nambe;
   public:
       void     Init(){Nambe=10 ;};
       void     Vedenie() {Nambe--  ;};
       bool     Start(){
         if (Nambe >0)return(true);
         return(false) ;
       };        
  };

then everything works:

2011.11.27 11:06:13 proba (EURUSD,M30) The start function returned false

2011.11.27 11:06:12 proba (EURUSD,M30) The start function returned true

2011.11.27 11:06:12 proba (EURUSD,M30) Start function returned true

2011.11.27 11:06:12 proba (EURUSD,M30) Start function returned true

2011.11.27 11:06:11 proba (EURUSD,M30) Start function returned true

2011.11.27 11:06:10 proba (EURUSD,M30) Start function returned true

2011.11.27 11:06:09 proba (EURUSD,M30) Start function returned true

2011.11.27 11:06:07 proba (EURUSD,M30) Start function returned true

2011.11.27 11:05:59 proba (EURUSD,M30) Start function returned true

2011.11.27 11:05:44 proba (EURUSD,M30) Start function returned true

Wonders.

 
gdtt:

If you fix the class text like this:

it works.

wonders.

Ctrl-C Ctrl-V does not work plz explain what the trick, and what version you have. I have build 540 from November 11, 2011.
Reason: