There appears to be a regression in build 3950 (14 Sep 2023) in the behavior of the preprocessor. The code below compiles without errors on the old build 3802 (9 Jun 2023): #define NAME(prefix, linenr) prefix##linenr #define
I am using the MT5 platform and noticed I never receive ticks closer together than 200 ms even during high volatility. Not via the OnTick() method, nor via CopyTicks() or CopyTicksRange(). However, my orders get filled at prices that do not
I am running two instances of the same EA on two VPSes in two different data-centers, each with a different magic number. Tonight both EAs placed the same buy stop order (with different magic numbers) using this code: CTrade trade; if
My EA opens positions at market price using OrderSend(). In the Strategy Tester, and on demo, when the call returns "10009 Request Completed", the MqlTradeResult .price field holds the price at which the position was opened, and the MqlTradeResult
My EAs log diagnostic data in a text file. This helps me troubleshoot users problems, monitor the trade execution (slippage, server roundtrip delay), etc. Unfortunately, my EAs are not perfect and might cause a critical error (e.g. " array out of
To get the current TP of an open position (hedging mode), I use if ( PositionSelectByTicket (positionId)) { return PositionGetDouble ( POSITION_TP ); } Once the position is closed, I search for the corresponding ENTRY_IN deal, and query