Codes

Reporting Memory Leaks in Strategy Tester for MetaTrader 5

Monitoring of memory leaks in the strategy tester

Forum

Proposition for reporting MEMORY LEAKS in strategy tester

Hi - happy New Year. In https://www.mql5.com/en/forum/383008#comment_26181711 I wondered why the strategy tester does not report any memory leaks if occurring in the MQL5 program. Look the following EA where I "forgot" to free the allocated memory: class A { private : string m_name; public : A(

Cannot close open orders and positions at EA termination

Hi, I have an EA which will close all open orders and positions in the OnDeinit function. This works fine if if I change the timeframe of the chart the EA is attached to. But if I remove the EA from the chart the OnDeinit function will be called; but cannot close the open orders and positions, the

Buy Limit Pending order is not triggered

Hi, today I stumbled on a problem with pending orders. Please see the following EA doing the following steps: trading the currency pair USDCHF as soon as the market is open two buy limit pendig orders will be placed: at 1.06800 and 1.06500 #include <Trade/Trade.mqh> bool OrderOpened; bool

Strange (incorrect?) behaviour of PrintFormat / StringFormat. Need help

Hi, today I stumbled across a very strange (or incorrect?) behaviour of the functions PrintFormat and/or StringFormat . Please see the following script: void OnStart () { double margin = 63.0 ; ENUM_ORDER_TYPE otype = ORDER_TYPE_BUY ; PrintFormat ( "wrong %s %s" , StringFormat

Commission is not displayed in deposit currency

Hi, I have a commission based forex account (Axiory-Demo). My deposit currency is EUR. Nevertheless in the specification of an arbitrary currency pair (eg GBPCHF) the commission value (for in_deal in this case) is shown in USD, not in my deposit currency. That is what I expect. Or am I completely

Suspicious account

Hi, after two weeks in holidays I restarted the MetaTrader trading software. But strange things happened: all connections to the broker servers are lost Instead I see a very suspect account which I cannot delete: Any ideas what happened here? Matthias

Explanation of Metatrader log file

Hi, could anybody explain the contents of the Metatrader log file, please? Especially the meaning of the two uppercase letters? Example: What is the meaning of 'MM', 'KF' etc.? Thanks Matthias MM 0 00 : 09 : 42.344 Startup access rights to common directory successfully checked KF

Please help - "Market closed" in Strategy Tester

Hi everybody, like always and done without any problems in previous versions of MT5 I want to test my (unmodified) EA by the strategy tester . But since I've installed MT5 build 2926 I cannot open any pending orders. I get the error messages CP 0 16 : 18 : 13.970 Tester DE30,H1

Modifying the volume of a pending order

Hello, is there a MQL5 function for changing the volume of a pending order in an hedging account ? Similar like changing SL or TP? Of course I can delete the order and reopen a new one with a different volume. But I want to avoid it if possible (more traffic). Thanks Matthias

How to get the maximum number of open positions in MT5

Hi alltogether, in https://www.mql5.com/en/forum/350188 there is the question of how to get the maximum number of open positions. In this thread William Roeder writes: " Margin requirements will be the limiting factor, not the count." But I'm asking whether this is correct. For example at least