Logging V2 for both MQL4 and MQL5 – library MetaTrader 5

Logging V2 for both MQL4 and MQL5 - library for MetaTrader 5
CDebugLogger Class V2: A Comprehensive Logging Utility for MQL4/5 The CDebugLogger class is a powerful and flexible logging utility specifically designed for MQL4/5 environments. It is an essential tool for developers who need to monitor, debug, and track the behavior of their applications with precision. In this new version of the CDebugLogger class, I have … Read more

Best Logging Class for both MQL4 and MQL5 – library MetaTrader 5

Best Logging Class for both MQL4 and MQL5 - library for MetaTrader 5
CDebugLogger Class: A Comprehensive Logging Utility for MQL4/5 The CDebugLogger class is a powerful and flexible logging utility specifically designed for MQL4/5 environments. It is an essential tool for developers who need to monitor, debug, and track the behavior of their applications with precision. Below, we explore the key features and capabilities of this class. … Read more

Easy to use Hedging Class for MQL4 by Peter Mueller – library MetaTrader 4 – library MetaTrader 4

Easy to use Hedging Class for MQL4 by Peter Mueller - library for MetaTrader 4 - library for MetaTrader 4
Input Parameters: OrderDistancePoints : Determines the distance in points from the current ask price for placing buy orders and from the bid price for placing sell orders. TPPoints : Specifies the take profit target in points. Startlotsize : Sets the initial lot size for trades. Gainperlot : Defines the desired gain per lot size. The … Read more

MQL4 Implementation of onTrade Event Handler – EA MetaTrader 4

MQL4 Implementation of onTrade Event Handler - expert for MetaTrader 4
The code keeps track of orders’ tickets in an CArrayInt. Monitoring the changes to the list of tickets in onTimer it triggers these event handlers: //+——————————————————————+ //| Event handler when stop loss is hit                              | //+——————————————————————+ void onStopLoss(ulong ticket); //+——————————————————————+ //| Event handler when take profit is hit                            | //+——————————————————————+ void onTakeProfit(ulong ticket); //+——————————————————————+ //| Event handler … Read more

HTTP using WinINet directly in mql4 – script MetaTrader 4

HTTP using WinINet directly in mql4 - script for MetaTrader 4
Author: mapick This is a “conceptual” script I developed to test the WinINet functions to load a HTTP page directly from mql4 The code imports the wininet.dll original windows library, then it calls all the needed functions, as stated in MSDN documentation, simply translating the mql data types: You have only to run the script … Read more

MQL4 to MQL5 compatibility library – library MetaTrader 5

MQL4 to MQL5 compatibility library - library for MetaTrader 5
This library allows to run most scripts and indicators from MetaTrader 4 on MetaTrader 5. Most of the functions are covered already and only trading logic is not added so for experts because the trading mechanics need to be rewritten. This library has covered most of functions except EA trading mechanisms. Also for the functions … Read more

Simple UnitTest include library for new MQL4 – library MetaTrader 4

Simple UnitTest include library for new MQL4 - library for MetaTrader 4
This is a simple (cheap) UnitTest include library for MQL4. How to use: See a sample attacched: TestExpert.mq4 By UnitTest#printSummary(), the result is output as follows: Distribution: Source is distributed at GitHub repository. Simple UnitTest include library for new MQL4 – library MetaTrader 4

MySQL for new MQL4 (tested in build 600) – library MetaTrader 4

MySQL for new MQL4 (tested in build 600) - library for MetaTrader 4
Author: Originally created by Russell, then modified by vedroid and now forked by lukins Since build 600 of MT4 was released, it’s no longer easy to communicate with DLLs that use ANSI format for strings because strings in MQL4 are now in UNICODE format (read more here). This library is based on vedroid’s modification of … Read more

HTTP requests for new MQL4 (tested in build 600) – library MetaTrader 4

HTTP requests for new MQL4 (tested in build 600) - library for MetaTrader 4
Description: This is a simple MQL4 wrapper that uses Windows native wininet.dll. It allows you to send HTTP requests (currently supported only GET method) to a remote destination and read the body response from MQL that was compiled in build 600 and newer (not in a strict mode). For latest version, issues tracker and contribution … Read more