MetaEditor build 1463 - page 14

 
Renat Fatkhullin:

Nowhere yet.

ArrayPrint - similar.
 
The problem is .
void OrderSend( int ) {}  // no problem
void Print( MqlTick& ) {} // 'Print' - override system function

I.e. external class "::" won't allow overloading, but any internal class will.

That's why we have to crutch the restriction

class PRINTCLASS
{
public:  
  template <typename T>
  static void MyPrint( const T &Value )
  {
    T Array[1];
    
    Array[0] = Value;
    
    ::ArrayPrint(Array);
  }
  
  template <typename T>
  static void MyPrint( const T Value )
  {
    ::Print(Value);
  }
};

#define Print(A) PRINTCLASS::MyPrint(A)

void OnStart()
{
  MqlTick Tick;
  
  SymbolInfoTick(_Symbol, Tick);

  Print(Tick);
  
  int i = 5;
  
  Print(i);
}
ZS ArrayPrint is not highlighted on the site.
 
The 1467 build is out now. What changes are there?
 
Still not resolved
 

Found a problem with my indicator in the tester. Since build 1463 the tester hangs when testing the indicator, almost immediately after start. It is the tester that hangs, not the indicator. Because, when compiling with either old or new compiler, the problem remains, but in the old tester everything is tested normally.

The place in the code, which leads to a hang, could not be found. I tried to make Comment in different lines of code, but it always hangs in different places. In general, some kind of internal error tester.

 
Alexey Navoykov:

Found a problem with my indicator in the tester. Since build 1463 the tester hangs when testing the indicator, almost immediately after start. It is the tester that hangs, not the indicator. Because, when compiling with either old or new compiler, the problem remains, but in the old tester everything is tested normally.

The place in the code, which leads to a hang, could not be found. I tried to make Comment in different lines of code, but it always hangs in different places. So, some kind of internal bug in the tester.

So still hangs or in the tester you just set the maximum test speed?

Added: I haven't encountered this before, so it's very desirable to review your code.

 
Alexey Navoykov:

The place in the code causing the hang-up could not be found.

Set it to permanently record the entire screen in the video. When you encounter a bug, stop recording and trim off anything not needed in the video.
 
Vladimir Karputov:

So does it freeze, or do you just have it set to the maximum test speed in the tester?

Added: I haven't encountered this before, so it's very desirable to review your code.

It freezes at any speed. The StrategyTestVisualization window does not respond. Unfortunately, I cannot show you all of the code, it's a commercial product.

It does not depend on the test mode and timeframe, either.

 
Alexey Navoykov:

It freezes at any speed. The StrategyTestVisualization window does not respond to requests. Unfortunately, it's not possible to show the whole code, it's a commercial product.

The only way to show the code is to use ServiceDesk. Although, there is a suspicion of an infinite While loop in the indicator...
 
fxsaber:
2016.11.10 11:07:42.764 Test (EURUSD,M1)                         [time]   [bid]   [ask]  [last] [volume]    [time_msc] [flags]
2016.11.10 11:07:42.764 Test (EURUSD,M1)        [0] 2016.11.10 11:10:11 1.09207 1.09217 1.09207   500000 1478776211595       2

The only thing missing is an ArrayToString. Then the output could be modified. For example, time_msc and flags.

Please change MqlTick to
struct MqlTick
  {
   datetime     time;          // Время последнего обновления цен
   double       bid;           // Текущая цена Bid
   double       ask;           // Текущая цена Ask
   double       last;          // Текущая цена последней сделки (Last)
   ulong        volume;        // Объем для текущей цены Last
   datetime_msc time_msc;      // Время последнего обновления цен в миллисекундах
   uint         flags          // Флаги тиков
  };
I.e. introduce a new type datetime_msc.