Codes

CRect and CCanvas replacement (Standard Library - several bugs fixed) for MetaTrader 5

Bug fixed versions of CRect and CCanvas which are part of the standard library

CWndContainer Replacement for MetaTrader 5

This file replaces the WndContainer.mqh original file. It prevents the chart from being affected when you click and hold the mouse inside a container area

Forum

MQL Service EA for custom symbol - how to?

Hi, besides EAs and indicators, there is this service-thing. I remember I read somewhere, that such can be used to support custom-symbols. Is this possible? What I would like to to is to restrict a given symbol, like EURUSD, and then restrict it to specific trading hours, e. g. from 7:00am to 7:00pm

Access violation read (0x00000070), "Incorrect casting of pointers" etc. with Indicators

Since Build 1380, also with the current build 1400 we face this issue in MT4 that occurs either when changing the timeframe of an indicator or when terminating the indicator within the code. This is is clearly a BUG in MT4. That we talk about a bug is certain, since the code works without problems

Commandline version of MetaEditor.exe buggy - needs far too long to open a file after a while

Since the latest builds, at least since 3802 of MT5, the commandline execution of MetaEditor does not work proper anymore. The MetaEditor.exe can be executed with the parameter of the file to be opened in the editor. When the editor is already opened and the specific file is also already opened, the

Freezing charts - Error 4203

Hi, its frequently that we have to deal with frozen charts. Any function like ObjectGetInteger(), even ObjectName() or similar, then needs seconds to return and the error code is always 4203. The error code makes no sense at all, since ObjectGetInteger() uses OBJ_TYPE with an existing object, and

What happened since Build 2755? (Chart freezing - bug not resolved since 2 years!)

Since two years we are facing the same bug in MT5 which wasn´t there before. 2755 was the last build which made no problems, all builds afterwards come with the same issue. There must have been a general change within the task management of MetaTrader 5, but we got no help from MetaQuotes to isolate

Two years later - still the same problems in the Editor (Build 2755 > 3521)

Hi MetaQuotes, I was sticking to Build 2755 for almost two years coz it was the most stable version, until I was forced now to update the latest build, since a connection to most of the brokers was not possible anymore. Now I have to use MT5 Build 3521 and I am wondering, that my "problem-list"

How to overload the subscripting assignment operator '[]=' ?

Hi all, the example is generic, since I have no idea how to overload the indexed assignment ... does anyone know how to do? class CIntArray { int array[]; ... public : void Set( int index, int value ) { array[index]= value ;

Global initialization failed - Build 1340

Hi, got that message, just like that. 1. Compile with 1330, execute with 1330 - works 2. Compile with 1330, execute with 1340 - works 3. Compile with 1340, execute with 1340 - error I found this topic already with a very much older version of MT4, but not recently. We talk about <> 125.000 lines of

Skipped constructor with ArrayResize() - Bug?

Hi, this is a bug, right? The constructor should always be excecuted, also with ArrayResize. When changing struct to class, it works in both cases, struct works only with first case, not when using ArrayResize() struct CA { public : int intvalue; public : CA() { Print (

Long to char array - where is the bug?

Hi, I need to store a long or ulong value into a char array. Therefore I split the value into pieces of 8 bit and store these parts into 8 elements of a char array. Following macro is used: #define L64_TO_UCHAR(value,array,pos) { array[pos+ 0 ]= uchar (value& 0xFF );array[pos+ 1 ]=( uchar