Doerk Hilger / Publications
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
Z-Order with chart-objects. What works?
Hi, since I dont know when, I try to figure out how the z-order works with MQL chart objects and my conclusion is so far that nothing works, no matter which value I give a chart object and its always random. For example: The picture shows a pattern and vertical lines, this comes from a BitmapLabel
Server-timezones DST - what is the standard?
Since we deal with different timezones to convert between local time and chart/server-time, we need to define rules in the code. The timezones are just one thing which is easy, but the DST rules are another. Based on my experience, it does not matter where the brokers-server is located, the DST rule
CopyRates - BUG
CopyRates freezes when switching timeframe, in this case from H1 to M15 for 60 seconds. As far as I see, it happens mainly when an indicator in the same chart with the EA accesses the same bars data. Its surely not a coincidence, that the DST changed today in Europe, while the servers DST did not
ChartGetInteger(chart_id,CHART_FIRST_VISIBLE_BAR) - BUG
Hi, the function in general works, but since the usage of the function results in unacceptable lagging of the whole EA when frequently used, it has to be called a bug. And its not new, its there since years. MQ doesn´t fix it. My procedure: Whenever the chart changes, I collect all the chart data
No one of the overloads can be applied to the function call ... MT bug?
double, string, string, color, color Nothing wrong here but I get an error. Build 5200 In Detail where CVSButtonMenu inherits from CVSwitch, while definition in CVSButtonMenu is and in CVSwitch it is
Importing DLL / struct - documentation is incomplete
https://www.mql5.com/en/docs/runtime/imports I want to refer to the import of structs. Structs can be passed by reference. In the import section you define like void MyFunc( mystruct &data ); And within C# you define the param as IntPtr. public static void MyFunc( IntPtr data ) Then simply use
Compiles in Commandline-Mode but not from Editor (template/typename T)
Hi, phenomenon. This piece of code is rejected when I compile from the editor, but not when its compiled via commandline. Editor compiler reports: "T" unexpected token for the first line. public : template < typename T> T Get( int index, T defaultvalue=(T) NULL ) { // ... if
Canvas incredibly slow. Why?
Hi, when I see samples of how people use the CCanvas class, Im always surprised. When I use the class, I have to work asynchronously all the time since it is simply way too slow and I don`t know why. This little piece of code, which does not more than painting 3 times a text, needs between 0.3 and
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
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
