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

To add comments, please log in or register
kypa
1062
kypa  

ERR_MARKET_NOT_SELECTED

4302

Symbol is not selected in MarketWatch


https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors
  • www.mql5.com
The name of the custom symbol is invalid. The symbol name can only contain Latin letters without punctuation, spaces or special characters (may only contain ".", "_", "&" and "#"). It is not recommended to use characters , :, ", /,\, |, ?, *. The path of...
rodrigoabrao
254
rodrigoabrao  
nicholi shen:

Will this script run in debugging without hitting a breakpoint? 

I don't get it. Can you explain how to use it?
Ma man, the EA was perfectly working absolutely no problem so far from now. Exactly after the update. My code is right, the problem is the platform. it seems the symbol is not currently being read. 

rodrigoabrao
254
rodrigoabrao  
kypa:

ERR_MARKET_NOT_SELECTED

4302

Symbol is not selected in MarketWatch


https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

I know it already bro. I drop the EA at the graph, and I get this sh. it is happening, in two different computers just after the update. it is just useless since I put no restriction to the symbol in the code.

nicholi shen
2261
nicholi shen  
rodrigoabrao:

I don't get it. Can you explain how to use it?
Ma man, the EA was perfectly working absolutely no problem so far from now. Exactly after the update. My code is right, the problem is the platform. it seems the symbol is not currently being read. 

I'm trying to help you debug. You need to run the script in debug mode. I can confirm that it works as expected on my PC. Also you need to add this to your EA:

SymbolSelect(other_than_chart_symbol, true);
rodrigoabrao
254
rodrigoabrao  
nicholi shen:

I'm trying to help you debug. You need to run the script in debug mode. I can confirm that it works as expected on my PC. Also you need to add this to your EA:

So I am pretty screwed up. Both of my computers are not. Also, none of my 3 brokerages. I am not familiar with the debug mode. Where should I add this code ?

rodrigoabrao
254
rodrigoabrao  
I deleted a code was in my full code I took some time ago in the MQL5 articles. Now, it works. Thank you very much man. 

//--- Monitoring expert installation on the necessary timeframe
//if(Period()!=PERIOD_M1)
//{
// Print("Coloque o EXPERT no timeframe corrent M1",EnumToString(PERIOD_M1));
// return(INIT_FAILED);
//}

//---
   m_trade.SetDeviationInPoints(m_slippage);
//--- tuning for 3 or 5 digits
   int digits_adjust=1;

   digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;

//---

   m_money.Percent(InpPercentRiskDepo);
//--- create handle of the indicator iMA
   handle_iMA_M1_period5=iMA(m_symbol.Name(),PERIOD_M1,5,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M1_period5==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_M1_period8=iMA(m_symbol.Name(),PERIOD_M1,8,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M1_period8==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_M1_period13=iMA(m_symbol.Name(),PERIOD_M1,13,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M1_period13==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_M1_period60=iMA(m_symbol.Name(),PERIOD_M1,60,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M1_period60==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_M15_period4=iMA(m_symbol.Name(),PERIOD_M15,4,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M15_period4==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_M15_period5=iMA(m_symbol.Name(),PERIOD_M15,5,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M15_period5==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_M15_period8=iMA(m_symbol.Name(),PERIOD_M15,8,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_M15_period8==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iMA
   handle_iMA_H1_period24=iMA(m_symbol.Name(),PERIOD_H1,24,0,MODE_SMA,PRICE_TYPICAL);
//--- if the handle is not created 
   if(handle_iMA_H1_period24==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
Romeu Bertho
4981
Romeu Bertho  
nicholi shen:
StringSplit still leaking strings in build 1931

The same is happening to me.


Romeu Bertho
4981
Romeu Bertho  

CustomTicksAdd() function is not working properly in compiled files by build 1931.
The volume of the ticks[] is very different when it shows on DOM or in bars tab from symbol list.

volume here is only integer numbers.

CustomTicksAdd() is working fine until build 1881.

Compiled files from 1881 are working fine on build 1931, except leaked string.

compiled on build 1931

fxsaber
11096
fxsaber  
Romeu Bertho:

CustomTicksAdd() function is not working properly in compiled files by build 1931.
The volume of the ticks[] is very different when it shows on DOM or in bars tab from symbol list.

volume here is only integer numbers.

CustomTicksAdd() is working fine until build 1881.

Compiled files from 1881 are working fine on build 1931, except leaked string.

Tick.volume_real = 0; // OR: = Tick.volume
sadplanet
47
sadplanet  
sadplanet:
MetaTrader now freezes on startup as it's about to login. No charts are even open. Anyone else having this problem?
Is anyone from MetaQuotes looking into this!!! Broker was no help!
To add comments, please log in or register