BUG REPORT New MetaTrader 5 platform build 1930 - page 2

 
Yohei Murakami:

 I got the same problem.

 iCustom in the new version of MT5 is very buggy.

 I'm confident that it's a bug.

My indicator that uses iCustom, output an error description 'Symbol is not selected in MarketWatch'.


 Please fix it as fast as possible.

Do you have some code to reproduce the issue ?

//+------------------------------------------------------------------+
//|                                              iCustom_Example.mq5 |
//|        Copyright 2018,Marco vd Heijden,MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018,Marco vd Heijden,MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"

//--- input parameters 
input int MA_Period=21; 
input int MA_Shift=0; 
input ENUM_MA_METHOD MA_Method=MODE_SMA;

//--- Handle of the Custom Moving Average.mq5 custom indicator 
int MA_handle; 
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   ResetLastError(); 
   MA_handle=iCustom(NULL,0,"Examples\\Custom Moving Average", 
                     MA_Period, 
                     MA_Shift, 
                     MA_Method, 
                     PRICE_CLOSE // using the close prices 
                     ); 
   Print("MA_handle = ",MA_handle,"  error = ",GetLastError()); 
//--- 
   ChartIndicatorAdd(0,0,MA_handle);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+

In fact i have made this example for you.

Can you modify it so that it will reveal the iCustom issue you mention ?

 
Yohei Murakami:

Sorry, I can't show my code because my indicator has been being developed in secret. And my problem occurs without Custom Moving Average. I'm calling my indicator through iCustom. And this problem occurs only in the M1 time frame.  It's working fine with other time frames.

I can say that MQL5's iCustom has critical problem that does not occur in MQL4.

I don't know why but it's true.


ErrorDescription(GetLastError())  returns 'Symbol is not selected in MarketWatch'.


JUST WEIRD and I can't find what is related to this problem in MQL5 reference manual.

The error message is pretty clear not ? You are calling iCustom with a symbol which is not selected in the Market Watch. Nothing to do with an MT5 bug.

Fix your secret code :-D

 

I provided a sample code to show you that there is nothing wrong with iCustom.

It's an error in your secret code.

Fix it.

We can not help you;

 
Alain Verleyen:

The error message is pretty clear not ? You are calling iCustom with a symbol which is not selected in the Market Watch. Nothing to do with an MT5 bug.

Fix your secret code :-D

 I solved it by myself.

 'Zero Divide' in my indicator had prevented correct procedure.

 'Symbol is not selected in MarketWatch' was just caused by wrong symbol name.

 
The recent MT5 version(start from 1930 ) has some big bugs, not only on your problem, but other bugs like  basic function as CopyRates. It is better to find the old MT5 version and not to update it. Till MetaQuotes solve this problem, then update.
 

Bug on latest version of MQL5 the profit total is wrong

Change seen since upgrading to latest version 2057 21 May2019

manual calculation the profit should be +10USD shows -157USD

Please see attached screenshot, NO large neg profits.

Files:
 
RenierM:

Bug on latest version of MQL5 the profit total is wrong

Change seen since upgrading to latest version 2057 21 May2019

manual calculation the profit should be +10USD shows -157USD

Please see attached screenshot, NO large neg profits.

I don't think that you are showing all trades.

Does your calculation take into account the swaps?

Reason: