Errors, bugs, questions - page 1060

 
x100intraday:
You see. The lack of higher timeframes in my mind involuntarily equates to a suspicious"the developers are not telling me something... "Isn't it like that for someone else?
I don't have it like that! And I'm sure everything "negotiates" - because there are very few people like you who need such a trick
 
server:
I do not have it like that! And I am sure that everything can be arranged - because there are few people like you who need it.

My view: you can never have too much data for analysis. Even for the short-term trader it is sometimes useful to know what is being done outside of today's day. Lack of information, especially not too obvious in importance, sooner or later turns against the trader.

However, sometimes there are too many contradictory calculations to make a decision, so it would seem that there is no need for more data. But it is not a question of data redundancy, but of correct data management. With a surplus of background information one is able to do something, including ignoring it, but with a lack of information one cannot go far and in the right direction.

 
MetaDriver:
2013.09.07 02:39:36 iTester-SL (GBPUSD,M1) 1 object of type CTestStat left
2013.09.07 02:39:36 iTester-SL (GBPUSD,M1) 1 undeleted objects left

Memory leak // Or glitch in the linker.

The object has been declared as a static global variable. (!) That is, it is not dynamic at all.

The problem occurred after the part of the code which uses this variable was moved to an .mqh file and declared in this file as extern (no leakage was detected before):

The program works fine.

// I avoided the problem by declaring the object dynamic. Now I create it in OnInit(), delete it in OnDeinit(). Leakage (leakage messages) stopped.

Thank you, let's check it out.
 

Does anyone know what kind of trading tool PROFIT is?

 
MetaDriver:

A big request to those present at the forum, to test OnCalculate() for duplicate calls and nulling of prev_calculated on each tick.

And post your results here (is/is not duplicated).

Test indicator here.

I think I have managed to consider the duplication of ticks. Pavel Tsatsenko (kPVT) has helped me // Thank you very much!

It turned out that this problem occurs when copying requests ( CopyXXX(...) ) outside the range of the buffer to be copied. In particular, in the indicator, that is offered for testing, there is an inaccuracy that results in requesting more than rates_total bars.

The corrected version is attached in the trailer. It works in my terminal without duplication of ticks at all settings of the terminal. Interested comrades may check it. If anyone has tick duplicates please signal.

Files:
 
paladin800:

Does anyone know what kind of trading tool PROFIT is?

most likely it's trades that didn't hit any of the symbols, maybe a top-up.
 

The inheritance of the classes is buggy. I haven't been able to finish a class for 3 days now because compilation bugs are creeping in!

Here's the first bug:

class CAbstract
{
protected:
   int m_handle;

public:
   CAbstract() : m_handle(INVALID_HANDLE) {}
   int GetHandle() const {return(m_handle);}
};

class CMyObj : CAbstract
{
};

class CHandle : CAbstract
{
protected:
   CMyObj *m_objects[];

public:
   ~CHandle()
   {
      int x;
      // Error: 'CAbstract::GetHandle' - cannot call private member function
      for (x = ArraySize(m_objects)-1; x>-1;x--) Print(m_objects[x].GetHandle());
      
      Print(m_handle);
   }
};


And here's the second:

class CAbstract
{
protected:
   int m_handle;

public:
   CAbstract() : m_handle(INVALID_HANDLE) {}
   int GetHandle() const {return(m_handle);}
};

class CMyObj : CAbstract
{
};

class CHandle : CMyObj
{
public:
   void Log()
   {
      // Error: 'm_handle' - private member access error
      Print(m_handle);
   }
};

Well, there are no private members!

Bug report number is #835727.

 
Roffild:

The inheritance of the classes is buggy. I haven't been able to finish a class for 3 days now because compilation bugs are creeping in!

Here's the first bug:


And here's the second:

Well, there are no private members!

Bug report number is #835727.

There is, however. Try it this way:

class CAbstract
{
protected:
   int m_handle;

public:
   CAbstract() : m_handle(INVALID_HANDLE) {}
   int GetHandle() const {return(m_handle);}
};

class CMyObj : public CAbstract   // Наследование по умолчанию приватное. И в С++ и в mql
{
};

class CHandle : CAbstract
{
protected:
   CMyObj *m_objects[];

public:
   ~CHandle()
   {
      int x;
      // Error: 'CAbstract::GetHandle' - cannot call private member function
      for (x = ArraySize(m_objects)-1; x>-1;x--) Print(m_objects[x].GetHandle());
      
      Print(m_handle);
   }
};
Private inheritance makes all members of an inherited class private.
 
MetaDriver:
 // Наследование по умолчанию приватное. И в С++ и в mql

From the MQL5 help:

class CDerived: public CBaseClass // public наследование можно не указывать, оно по умолчанию
  {
 
Roffild:

From the MQL5 help:

He who lives by the book will die of a typo.