New MetaTrader 5 platform build 1930: Floating window charts and .Net libraries in MQL5 - page 8

 

Access violation generates during testing in MT5 build 1940.

OL      2       18:37:37.026    Core 1  2010.09.16 09:22:40   Access violation at 0x000000013F6AC5F4 write to 0x0000000008D9C852
IS      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC390 48896C2418        mov        [rsp+0x18], rbp
MP      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC395 57                push       rdi
DR      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC396 4154              push       r12
RD      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC398 4155              push       r13
EI      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC39A 4156              push       r14
CG      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC39C 4157              push       r15
LD      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC39E 4883EC20          sub        rsp, 0x20
OQ      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3A2 498B6904          mov        rbp, [r9+0x4]
NQ      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3A6 33FF              xor        edi, edi
RN      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3A8 4D8BF1            mov        r14, r9
GN      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3AB 4D8BF8            mov        r15, r8
IN      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3AE 4C8BE2            mov        r12, rdx
MP      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3B1 4C8BE9            mov        r13, rcx
RE      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3B4 4885ED            test       rbp, rbp
PI      2       18:37:37.026    Core 1  2010.09.16 09:22:40                 000000013F6AC3B7 7515              jnz        0x13f6ac3ce


//


The full log is attached.


Files:
20181105.log  28 kb
 

Build 1944. Unless I missed something the new TesterStop() doesn't work well with Genetic Algorithm. It is trying again and again the same "stopped" passes :


Attached test code and set file.


 
В СБ ошибка деления на ноль
zero divide in 'Graphic.mqh' (2052,23)
 

There is some problem with OnDeinit in MT5 build 1940 . When you call a simple function with a loop to delete graphical objects the platform freezes for a few seconds and fails to delete all objects.

With the code below you can reproduce the bug.

string objName;
string uniqueid="XID: ";
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   EventSetMillisecondTimer(100);

   cal_Init();

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   EventKillTimer();

   if(reason!=REASON_CHARTCHANGE){ObjectDelete(0,"Init"); ObjectDelete(0,"Del"); cal_Deinit();}

//cal_Deinit();
//ObjectsDeleteAll(0,-1,-1);
//ChartRedraw();
  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
   if(ObjectGetInteger(0,"Del",OBJPROP_STATE)==true){cal_Deinit(); ObjectSetInteger(0,"Del",OBJPROP_STATE,false);}
   if(ObjectGetInteger(0,"Init",OBJPROP_STATE)==true){cal_Init(); ObjectSetInteger(0,"Init",OBJPROP_STATE,false);}
  }
//+------------------------------------------------------------------+
//| Init                                                             |
//+------------------------------------------------------------------+
void cal_Init()
  {
   objName="Init";
   ObjectCreate(0,objName,OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,objName,OBJPROP_HIDDEN,true);
   ObjectSetInteger(0,objName,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,objName,OBJPROP_COLOR,clrBlack);
   ObjectSetInteger(0,objName,OBJPROP_BGCOLOR,clrGray);
   ObjectSetInteger(0,objName,OBJPROP_BORDER_COLOR,clrBlack);
   ObjectSetInteger(0,objName,OBJPROP_XDISTANCE,650);
   ObjectSetInteger(0,objName,OBJPROP_YDISTANCE,0);
   ObjectSetInteger(0,objName,OBJPROP_XSIZE,120);
   ObjectSetInteger(0,objName,OBJPROP_YSIZE,25);
   ObjectSetInteger(0,objName,OBJPROP_FONTSIZE,10);
   ObjectSetString(0,objName,OBJPROP_FONT,"Verdana");
   ObjectSetString(0,objName,OBJPROP_TEXT,"Init");

   objName="Del";
   ObjectCreate(0,objName,OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,objName,OBJPROP_HIDDEN,true);
   ObjectSetInteger(0,objName,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,objName,OBJPROP_COLOR,clrBlack);
   ObjectSetInteger(0,objName,OBJPROP_BGCOLOR,clrGray);
   ObjectSetInteger(0,objName,OBJPROP_BORDER_COLOR,clrBlack);
   ObjectSetInteger(0,objName,OBJPROP_XDISTANCE,650);
   ObjectSetInteger(0,objName,OBJPROP_YDISTANCE,25);
   ObjectSetInteger(0,objName,OBJPROP_XSIZE,120);
   ObjectSetInteger(0,objName,OBJPROP_YSIZE,25);
   ObjectSetInteger(0,objName,OBJPROP_FONTSIZE,10);
   ObjectSetString(0,objName,OBJPROP_FONT,"Verdana");
   ObjectSetString(0,objName,OBJPROP_TEXT,"Delete");

   for(int x=0; x<30; x++)
     {
      for(int y=0; y<30; y++)
        {
         objName=uniqueid+"Button_"+(string)x+"_"+(string)y;
         ObjectCreate(0,objName,OBJ_BUTTON,0,0,0);
         ObjectSetInteger(0,objName,OBJPROP_HIDDEN,true);
         ObjectSetInteger(0,objName,OBJPROP_CORNER,CORNER_LEFT_UPPER);
         ObjectSetInteger(0,objName,OBJPROP_COLOR,clrGray);
         ObjectSetInteger(0,objName,OBJPROP_BGCOLOR,clrGray);
         ObjectSetInteger(0,objName,OBJPROP_BORDER_COLOR,clrBlack);
         ObjectSetInteger(0,objName,OBJPROP_XDISTANCE,50+20*x);
         ObjectSetInteger(0,objName,OBJPROP_YDISTANCE,50+20*y);
         ObjectSetInteger(0,objName,OBJPROP_XSIZE,20);
         ObjectSetInteger(0,objName,OBJPROP_YSIZE,20);
         ObjectSetInteger(0,objName,OBJPROP_FONTSIZE,10);
         ObjectSetString(0,objName,OBJPROP_FONT,"Verdana");
         ObjectSetString(0,objName,OBJPROP_TEXT,"");
        }
     }
   ChartRedraw();
  }
//+------------------------------------------------------------------+
//| Deinit                                                           |
//+------------------------------------------------------------------+
void cal_Deinit()
  {
   int len=StringLen(uniqueid);

   int total=ObjectsTotal(0,-1,-1);

   for(int i=total; i>=0; i--)
     {
      string name=ObjectName(0,i,-1,-1);

      if(StringSubstr(name,0,len)==uniqueid){ObjectDelete(0,name);}
     }
   ChartRedraw();
  }
//+------------------------------------------------------------------+
 

Hi,

    Did anyone test native support for .NET libraries?

The example code provided on the release notes page (https://www.metatrader5.com/en/releasenotes/terminal/1898) does not even compile.

MetaTrader 5 platform build 1930: Floating window charts and .Net libraries in MQL5
MetaTrader 5 platform build 1930: Floating window charts and .Net libraries in MQL5
  • 2018.10.26
  • MetaQuotes Software Corp.
  • www.metatrader5.com
Now you can detach financial symbol charts from the trading terminal window. This feature is convenient when using multiple monitors. Thus, you may set the main platform window on one monitor to control your account state, and move your charts to the second screen to observe the market situation. To detach a chart from the terminal, disable...
 

When debugging in the template function, it is impossible to look at the value of the type

TKey Unknown identifier
TValue Unknown identifier
 

Where do I start,JUST SIGNED UP? Im a beginner trader.

 
Bamaibangu:

Where do I start,JUST SIGNED UP? Im a beginner trader.

Where Do I start from -
https://www.mql5.com/en/forum/212020 
and
MetaTrader 5 Help - Trading Platform — User Manual

Where Do I start from?
Where Do I start from?
  • 2017.07.25
  • www.mql5.com
Hi fam! Am a total newbie in the forex niche... Just signed up here on this platform... Please where do i start from? I need help...
 

Forum on trading, automated trading systems and testing trading strategies

1957. Tester rips off all memory

Renat Fatkhullin , 2018.12.06 14:29

We released version 1958 with the correction of unpack error and memory leak in MQL5:

  • available on MetaQuotes-Demo and MetaQuotes-Beta
  • will be available in a short time on Help -> Check updates -> Beta
  • rollout agent updates in the cloud network