MQL4 OnTrade() Alternative – EA MetaTrader 4

MQL4 OnTrade() Alternative - expert for MetaTrader 4
Author: Coders’ Guru While discovering the MQL4 New build (610) capabilities I found a very useful even OnTrade() highlighted in MetaEditor. I clicked F1 to see its implementation but unfortunately it’s not supported yet in MQL4. That’s why I created my own Simulator. This code will raise events on these cases: OnOpen: When open a … Read more

MySQL library for MQL4 with proper memory management – library MetaTrader 4

MySQL library for MQL4 with proper memory management - library for MetaTrader 4
Original library file mql4-mysql.mqh is located here: . Give respect to the original authors for the work done (originally created by Russell, then modified by vedroid and lukins / Sergey) and read description of the original code. The original mql4-mysql.mqh library had a serious problem with memory management. Problems were reported by several users (you … Read more

RegularExpressions in MQL4 for working with regular expressions – library MetaTrader 4

RegularExpressions in MQL4 for working with regular expressions - library for MetaTrader 4
Real author: Microsoft Corporation. Source code taken from .Net Framework 4.6.1.  Note: The library works on the MetaTrader 4 build 1384 and higher. Unzip the archive into the terminal_data_folder. The library codes are located in the: <terminal_data_folder>\MQL4\Include\RegularExpressions\ Sample test scripts can be found in the <terminal_data_folder>\MQL4\Scripts\RegularExpressionsExamples\ Here is a translation of the RegularExpressions from .Net … Read more

Regular Expressions Tester MQL4 – script MetaTrader 4

Regular Expressions Tester MQL4 - script for MetaTrader 4
Materials on Regular Expressions The Regular Expressions for Traders article. The Regular Expressions in MQL4 for working with regular expressions library. Other Useful Materials Microsoft .NET Regular Expressions Microsoft .NET Regex Class Documentation Microsoft Regular Expressions – Quick Reference PDF Others: Using Regular Expressions with The Microsoft .NET Framework Most Useful CRegex Class Methods IsMatch() … Read more

Tick Chart in MQL4 – indicator MetaTrader 4

Tick Chart in MQL4 - indicator for MetaTrader 4
Introduction: This will create an offline chart for the ticks of the symbol on which it is applied. Instructions: I have mentioned in the code lines, such as: // Please uncomment the include file //#include <WinUser32.mqh> or // Please uncomment the below lines after downloading the file //if(hwnd!=0)// && cur_time-last_time>=2) //  { //   PostMessageA(hwnd,WM_COMMAND,33324,0); //   last_time=cur_time; … Read more

Trade Transmitter via web and OnTrade Function to MQL4 – script MetaTrader 4

Trade Transmitter via web and OnTrade Function to MQL4 - script for MetaTrader 4
This EA has 3 Very Interesting Functions: 1. It can Detect Trades and its modifications in the account, made by other EAs or made manually. 2. Once trades are detected, it can transmit each Trade over the web to any Server or any webapplication API (May require modification by professional coder, depending on the API). … Read more

Basic check-up of Experts for MQL4 – EA MetaTrader 4

Basic check-up of Experts for MQL4 - expert for MetaTrader 4
List of controls who performed in this function: have you any symbol in MarketWatch? The permission to trade for the given executed program. The Permission to trade for the Terminal. Are transactions Allowed for the account at the trade server side for expert? Are transactions Allowed for the account at the trade server side for for the current account ? … Read more

Logging library for mql4 – library MetaTrader 4

Logging library for mql4 - library for MetaTrader 4
This is a logging library to quickly add logging capabilities to your code without  much hassle. The library’s default behavior matches most cases however most of the functionality can be customized using pre-processor substitutions (#define) See the example scripts on how to use library. How to use #include <Logger.mqh> //+——————————————————————+ //| Script program start function                                    | … Read more

Breakout Martin Gale Expert Advisor for mql4 – EA MetaTrader 4

Inputs
The “Martin Gale Breakout” strategy is an Expert Advisor (EA) designed for trading in the Forex market. This EA combines a breakout trading approach with elements of the Martin Gale money management system to optimize trading performance. Input Parameters: TakeProfPoints: This parameter allows you to set the Take Profit level in points for each trade. BalancePercentageAvailable: Specify … Read more