High-Performance Time Functions (TimeUtils) – library MetaTrader 5

High-Performance Time Functions (TimeUtils) - library for MetaTrader 5
This library contains more than 80 different functions to deal with time variables. The primary aim of is to provide high-performance time functions. The performance mode (which can be controlled at a compile time via a #define) is disabled by default. This mode is not a requirement to include the library into your projects, as … Read more

MT4 to MT5 Convertor (MT5Compat.mqh) – library MetaTrader 5 – library MetaTrader 5

MT4 to MT5 Convertor (MT5Compat.mqh) - library for MetaTrader 5 - library for MetaTrader 5
MT5Compat a Comprehensive MT4 to MT5 Conversion Library A new interface library has been developed to simplify the process of converting MT4 indicators and Expert Advisors (EAs) to MT5. This library supports most of the MetaTrader 4 functions, offering developers a unified solution for cross-platform compatibility. You can add this to both Key Features: Extensive … Read more

Comment – library MetaTrader 5

Comment - library for MetaTrader 5
Just add the code  #include    settings will appear. Example of usage with default settings. No need to declare an instance of the class. #include <Comm.mqh> //+——————————————————————+ void OnTick()       string str = “PROGRAM_NAME = ” + MQLInfoString(MQL_PROGRAM_NAME) + “\n” + (string)TimeCurrent();    comm.Comm(str);    //+——————————————————————+ Example of use with the ability to change … Read more

Push Notification for Opened / Closed Trades (Netting) – library MetaTrader 5

Push Notification for Opened / Closed Trades (Netting) - library for MetaTrader 5
Features Sends notifications for trade opens and closes Shows trade type (Buy/Sell) and lot size for new trades Displays profit/loss for closed trades Works in both live trading and strategy tester (sends to logs in tester) Monitors last 2 hours of trading history Prevents notification spam through basic throttling Installation Add this function to your … Read more

Simplest Logger class for MetaTrader 5 – library MetaTrader 5

Simplest Logger class for MetaTrader 5 - library for MetaTrader 5
Every programmer has their own logger. I wrote my own for MQL5, inspired by the Python logging module. This class is simplest. No hierarchy, rotators or formatters. It’s simple and convenient for any project. Installation Copy CDKLogger.mqh to MQL\Include\DKStdLib\Logger folder. Import CDKLogger class. #include <DKStdLib\Logger\CDKLogger.mqh onee CDKLogger logger; // STEP 1. Init Logger with “MyLoggerName” … Read more

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

Easy to use Hedging Class for MQL5 by Peter Mueller – library MetaTrader 5

Easy to use Hedging Class for MQL5 by Peter Mueller - library for MetaTrader 5
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

Basic Library to Create Volume Profiles – library MetaTrader 5

Basic Library to Create Volume Profiles - library for MetaTrader 5
This library provides a few simple public methods to create and plot Volume Profiles: class VolumeProfile   { … public:    void              VolumeProfile(datetime _from, datetime _to);                     ~VolumeProfile() {};    double            GetHVPrice();    void              Plot(); …   }; GetHVPrice returns the price that is related to highest volume in the range. Here is a sample script to instantiate and plot a … Read more

Basic GridManager Library – library MetaTrader 5

Basic GridManager Library - library for MetaTrader 5
The library contains basic public methods to manage grids: public:                      GridManager(ENUM_GRID_DIRECTION direction, double grid_initial_lot_size, int grid_gap_points, double grid_profit_percent);                     ~GridManager() {};    void              SetGridMagicNumber(ulong magic);    void              SetGridMaxDD(double max_dd_percent);    void              SetGridMultiplier(double lot_multiplier);    void              Start(void);    void              Update(void);    void              CloseGrid();    double            GridPnL();    int               CountPositions(); In above code: MaxDD stands for “maximum allowed drawdown”. This value is disabled by … Read more