• Overview
  • Reviews (1)
  • Comments (22)
  • What's new

WalkForwardOptimizer

5
WalkForwardOptimizer library allows you to perform rolling and cluster walk-forward optimization of expert advisers (EA) in MetaTrader 4.

To use the library include its header file WalkForwardOptimizer.mqh into your EA source code, add call provided functions as appropriate.

Once the library is embedded into EA, you may start optimization according to the procedure described in the User guide. When it's finished, intermediate results are saved into a csv-file and some special global variables. Then you can view and analyse the results by means of accompanying script WalkForwardReporter, which generates comprehensible reports as html-pages. The script is free.


Header file WalkForwardOptimizer.mqh

#define DAYS_PER_WEEK    7
#define DAYS_PER_MONTH   30
#define DAYS_PER_QUARTER (DAYS_PER_MONTH*3)
#define DAYS_PER_HALF    (DAYS_PER_MONTH*6)
#define DAYS_PER_YEAR    (DAYS_PER_MONTH*12)

#define SEC_PER_DAY     (60*60*24)
#define SEC_PER_WEEK    (SEC_PER_DAY*DAYS_PER_WEEK)
#define SEC_PER_MONTH   (SEC_PER_DAY*DAYS_PER_MONTH)
#define SEC_PER_QUARTER (SEC_PER_MONTH*3)
#define SEC_PER_HALF    (SEC_PER_MONTH*6)
#define SEC_PER_YEAR    (SEC_PER_MONTH*12)

#define CUSTOM_DAYS     -1

enum WFO_TIME_PERIOD {none = 0, year = DAYS_PER_YEAR, halfyear = DAYS_PER_HALF, quarter = DAYS_PER_QUARTER, month = DAYS_PER_MONTH, week = DAYS_PER_WEEK, day = 1, custom = CUSTOM_DAYS};

enum WFO_ESTIMATION_METHOD {wfo_built_in_loose, wfo_built_in_strict, wfo_profit, wfo_sharpe, wfo_pf, wfo_drawdown, wfo_profit_by_drawdown, wfo_profit_trades_by_drawdown, wfo_average, wfo_expression};

extern WFO_TIME_PERIOD wfo_windowSize = year;
extern int wfo_customWindowSizeDays = 0;
extern WFO_TIME_PERIOD wfo_stepSize = quarter;
extern int wfo_customStepSizePercent = 0;
extern int wfo_stepOffset = 0;
extern string wfo_outputFile = "";
extern WFO_ESTIMATION_METHOD wfo_estimation = wfo_built_in_loose;
extern string wfo_formula = "";

#import "WalkForwardOptimizer.ex4"
void wfo_setEstimationMethod(WFO_ESTIMATION_METHOD estimation, string formula);
void wfo_setHeader(string s);
void wfo_setPFmax(double max);
void wfo_setGVAutomaticCleanup(bool b);
void wfo_setCleanUpTimeout(int seconds);
int wfo_OnInit(WFO_TIME_PERIOD optimizeOn, WFO_TIME_PERIOD optimizeStep, int optimizeStepOffset, int optimizeCustomW, int optimizeCustomS, string optimizeLog);
int wfo_OnTick();
double wfo_OnTester(string payload = "");
void wfo_setCloseTradesOnSeparationLine(bool b);
#import


Example of usage in your source code

#include <WalkForwardOptimizer.mqh>

...

int OnInit()
{
  ...

  wfo_setEstimationMethod(wfo_estimation,wfo_formula); // wfo_built_in_loose by default
  wfo_setHeader("EnvelopeRange,EnvelopeLength"); // "Payload" by default
  wfo_setPFmax(100); // DBL_MAX by default
  
  // can be set to true, only if genetics not used
  // wfo_setGVAutomaticCleanup(true); // false by default
  
  // wfo_setCloseTradesOnSeparationLine(true); // false by default

  // this is the only required call in OnInit, all parameters come from the header
  int r = wfo_OnInit(wfo_windowSize, wfo_stepSize, wfo_stepOffset, wfo_customWindowSizeDays, wfo_customStepSizePercent, wfo_outputFile);
  
  return(r);
}

double OnTester()
{
  // the passed string with optimizable work parameters of EA should match specified header in wfo_setHeader
  // the parameter is optional, you may have EA without parameters
  // the call to wfo_OnTester is required
  return wfo_OnTester(DoubleToStr(EnvelopeRange, 1) + "," + IntegerToString(EnvelopeLength));
}

void OnTick()
{
  int wfo = wfo_OnTick(); // required in OnTick
  if(wfo == -1) // this tick is before optimization window
  {
    return;
  }
  else if(wfo == +1) // this tick is after optimization window and forward test
  {
    return;
  }
  
  ...
  // your actual code goes here
}



Reviews 1
JohnnyBonnyBoy
24
JohnnyBonnyBoy 2022.09.18 09:07 
 

This library is a must have if you are trying to do a Walk Forward Analysis on MT4, and the author was very helpful when I had asked him questions. I would rent again!

Recommended products
Plain MT4
Ahmed Alaaeldin Abdulrahman Ahmed Elherzawi
This is a semi-automatic Expert Advisor that opens trades automatically based on the direction you set using the trade sell / buy on the panel. The magic of this EA is that it recognizes the objects that you draw on the chart by closing the open positions at key levels, it will notify you through the mobile notification, then it will wait for the next direction. It opens orders continuously regardless of the time frame of the chart. So you don't have to stay on a lower time frame. Instead, you c
WalkForwardLight
Stanislav Korotky
5 (1)
This is a simplified and effective version of the library for walk forward analysis of trading experts. It collects data about the expert's trade during the optimization process in the MetaTrader tester and stores them in intermediate files in the "tester/Files" directory. Then these files can be used by the special WalkForwardBuilder script to build a cluster walk forward report and rolling walk forward reports for refining it. The intermediate files should be manually placed to the "MQL4/Files
Live Bot Maker
Nabeel Zafar
5 (4)
Let Your Ideas Earn For You. Convert your Ideas and Strategies in to automated trading bots directly on MT4. Visual Strategy Builder with Instant Results on the chart. This One of a kind strategy builder, allows you to specify rules and visually see the signals based on those rule as you create them. Visit the link for Group, User Manual, Video Examples Why Use LBM LBM is an essential tool for traders of all levels. It allows traders to create strategies quickly and easily, and to test th
Modify Order SL TP
Konstantin Kulikov
5 (1)
The utility places stop loss and take profit for opened orders. It is necessary to allow automated trading in the terminal settings. Parameters magic - magic number. If less than 0, orders with any magic number are processed. only_this_symbol - only chart symbol. If false , orders of any symbols are processed. Take_Profit - take profit (TP). If the value is less than 0, then TP does not change. If the value equal to 0, TP is nullified (removed); Stop_Loss - stop loss (SL). If the value is less t
FREE
The Trend Professor is a moving average based indicator designed for the purpose of helping the community of traders to analyse the price trend. The indicator will be displayed in the main chart as it is indicated on the screenshot section. How it works The indicator has lines of moving averages and colored histograms to depict the direction of the trend. There will be a fast signal line colored blue/yellow/red at some points. The red/yellow colored lines stands for bearish trend/signal while th
A library for creating a brief trading report in a separate window. Three report generation modes are supported: For all trades. For trades of the current instrument. For trades on all instruments except the current one. It features the ability to make reports on the deals with a certain magic number. It is possible to set the time period of the report, to hide the account number and holder's name, to write the report to an htm file. The library is useful for fast assessment of the trading effec
RedeeCash Statistics
Patrick Odonnell Ingle
1 (1)
Version History Date Version Changes 07/10/2022 1.00 Initial release Description A collection of modern statistical functions that can be integrated into your own strategy. The included functions are, Mean Median Range Skew Max Min IRange Deviations AbsoluteDeviations MAD StandardDeviation Variance GetCorrelation SamplingDistributionStandardDeviation ZScore CorrelationCoefficient CoVariance Beta Confidence SNormInv PercentOfValue ValueOfPercent MQL Header (mqh) The required header is //+--------
FREE
MT4/5通用交易库(  一份代码通用4和5 ) #import "K Trade Lib.ex4"    //简单开单    long OrderOpen( int type, double volume, int magic, string symbol= "" , string comment= "" , double opprice= 0 , double sl= 0 , double tp= 0 , int expiration= 0 , bool slsetmode= false , bool tpsetmode= false );    //复杂开单    void SetMagic( int magic, int magic_plus= 0 ); void SetLotsAddMode(int mode=0,double lotsadd=0);    long OrderOpenAdvance( int mode, int type, double volume, int step, int magic, string symbol= "" , string comme
FREE
THE BEACH TRIP EA This EA designed for serious trader who become too serious and need to laid back and still having some decent trades, the setting is so simple and it works on any chart The Robot will scan continously on 1 mins, 5 min, and 15 mins chart. SEE the Strategy Tester Guide to know whether your history data is valid enough. The EA isn't optimize on any single currency, so the money management isn't build to last very long nor to make unrealistic parabolic curve on certain pairs.
Tool sends trades when open and close with chart to telegram channel.  Tool can send multiple charts and magic numbers and pairs from a single chart. Send information of all type of orders: Opened (including Pending Orders), closed tiggered, and modified orders. Telegram Setup instruction Open your Telegram APP and search for "BotFather". Type  /start  and click/type  /newbot  to create a new bot. Give your bot a nickname and username (e.g., nickname: Bestnavisignal and username: Bestnavisigna
PLEASE NOTE:   The "AUTO" function of the EA has NOT yet been activated . It's still ongoing testing. Once it becomes available, clients will get a free upgrade to EA 2.0                        Also .... PLEASE follow the instructions below in order for the functions to work properly. Introduction: The Phoenix Project (EA) Our Expert Advisor is both refined and practical. It is geared towards helping the traders be constantly aware of their risk PER trade while it helps them manage that risk
Minutes 51
Joaquin Nicolas Metayer
On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untram
FREE
Free version. Only works on EURUSD. Do you want to always know in a quick glance where price is going? Are you tired of looking back and forth between different timeframes to understand that? This indicator might just be what you were looking for. Trend Signal Multitimeframe shows you if the current price is higher or lower than N. candles ago, on the various timeframes. It also displays how many pips higher or lower current price is compared to N. candles ago. Number N. is customizable The dat
FREE
Algo Trading Indicaor  With this indicator , you’ll have zones and trends that hight probability the price will reverse from it. so will gives you all the help that you need  Why should you join us !?  1-This indicator is logical since it’s working in previous days movement , to predict the future movements. 2-Algo trading indicator will help you to draw trends which is special and are too strong than the basics trend , trends will change with the frame time that you work on . 3-We can
SetTP
Mohamed Aymen Maiza
This EA allows to set a specific Take Profit for all the trades of the same symbol when dropped in the chart. The Take profit can be set in the setting menu as a market price and not in pips. Usefull when opening multiple orders and want to close them all in one time at a specific market price level without entering manually the take profit for each trade. For any question about this EA, you are welcome to contact me.
Simple script to analyze posibility of profit for whole market all Symbols. You can specify minimum and maximum profit in percent and number of steps for each period. Script will found most interesting symbols depend on your configuration. You will get a quick and current analyze of whole market which can help you to make right choice of trades, you never miss oportunity again.
FREE
Our trade calculator program is an essential tool for any trader looking to make informed decisions and optimize their trades on the popular MetaTrader 4 platform. The program provides traders with real-time market data and advanced analytics, allowing them to easily calculate their position size, risk-to-reward ratio, and potential profits or losses. It also offers customizable settings, allowing traders to tailor the tool to their specific trading style and preferences. With our trade calcula
FREE
Drawdown Alert
Sakda Prempreenon
4.5 (2)
Drawdown Alerts Free ! Meta Trader 4 Indicator. Please leave a review about this product to help other users benefit from it. This Drawdown Alerts indicator shows the drawdown percentage in real time and alerts you when the limit you specify is reached. Calculation of drawdown depends on the amount of the trade balance. You can customize Drawdown Alerts for Corner - Left , Right , Up , Down X Y Color Number of decimal digits Popup messages and sound - Turn  on / off  notifications Notification
FREE
Indicator panel
Vladimir Khlystov
The panel shows 6 indicators and their signals for all timeframes. You can enable or disable various signals, entire timeframes, and individual indicators. if the alert button is pressed and all signals match, the indicator sends a message to the alert window. You can disable and enable both individual signals and the entire indicator for all timeframes, or disable individual timeframes for all indicators
FREE
YPY Trading Aggregator is a universal multifunctional software package for aggregation of trading. This functionality can be useful for multicurrency trading and/or application of multiple experts on a single trading account, as well as for combining automatic and manual trading. Also, anyone can use this utility to estimate the risk of the current online trading on the account (the maximum possible losses in % of the account balance). The utility aggregates the data of the active trade and outp
MirrorEA
Eugenio Bravetti
The new version of  MirrorSoftware 2021  has been completely rewriten and optimized.  This version requires to be loaded only on a single chart because  it can detect all actions on every symbol and not only the actions of symbol where it is loaded. Even the  graphics and the configuration mode  have been completely redesigned. The MirrorSoftware is composed of two components (all components are required to work):  MirrorController  (free indicator): This component must be loaded into the MAST
Q Math
Dariel Iserne Carrera
5 (2)
Check it out and if you like it just enjoy it. Try various values to find the setting that best suits your trading. Upward signal if the indicator is colored lawn green and bearish signal if the indicator is gray. You can use the line itself to trailing stop when you open orders. This is just a tool. A complement. It is not a strategy. Combine it with your own analysis Just download it and try it, it's free.
FREE
Reward Multiplier is a semi-automatic trade manager based on pyramid trading that opens additional orders with the running profit of your trades to maximize return exponentially without increasing the risk. Unlike other similar EAs, this tool shows potential profit/loss and reward to risk ratio before even entering the first trade! Download full version here  ( In the mini version. Starting lot is fixed at 0.01 (or minimum allowed lot size ) Guide + tips here MT5 version   here You only open the
FREE
A tool for logging personal and downloaded MQL5 trade history data  between specified date range into a CSV file and capturing open trade and close trade chart pictures This History Capturer and Writer tool is an Indicator, so it works well in coexistence with other expert advisor on the same chart $30  for the next 25 downloaders, next price: $30 Try Free Trial Version Here:   Download Free Trial Features: Trade History Chart Screenshot : Capture the opening and closing charts for each h
This EA is based on the relationship between the three currencies, interaction, and thus hedging, I now find the most ideal pair of currencies is the default parameter of the three pairs of currencies, On the parameters Parameter setting is very simple, "Huoli" is profitable n USD. Users can determine the number of orders according to the funds of the account.
Al Pivot Assistant TEST 4
Tjia Elisabeth Jasmine Canadi
[As of Des 18, downloaded by 324 traders]  Motto:  "PORTFOLIO target > 95% Blue" every trader becomes the instant winner > Promise, can be proven, find the proof in   the last chapter  > Dedicated to serious traders, who need a genuine, state-of-the-art product   ! Look for a product that offers real, sophisticated visual proof, not just theoretical promises. If you're serious about trading, find a product made for serious traders, even if it's just a free version for training and presentations.
FREE
NATS (Niguru Automatic Trailing Stop) will help you achieve more profits, by setting the trailing stop automatically. Pair this NATS application with EA, or can also be used as a complement to manual trading. A trailing stop is a powerful tool in trading that combines risk management and profit optimization.  A trailing stop is a type of market order that sets a stop-loss at a percentage below the market price of an asset, rather than a fixed number. It dynamically adjusts as the asset’s pric
FREE
close all profitable orders The set contains scripts for different purposes, facilitating work in the MetaTrader 4 terminal. If necessary, a screen is provided for some scripts. Before working on a real account, check (on a demo account) whether the required script responds to your tasks (for example, there is a script for opening five orders at the same time, by default the lot is set to 10; so that you do not accidentally open five positions with a total volume of 50 lots - be attentive))) Use
MT4 Alert Sender is a free ea tool that help you send the alert messengers in MT4 program for many different purpose with ease. Very simple and effective, you only need to input the alert content in a input box, then click a "Send Alert" button. The EA will send alert message. An alert pop-up shows your content in a new window pop-up. You can combine of using MT4 Alert Sender EA with any other tools out there for your need. Thanks for your trust in my product.
FREE
An EA to export trading history for FXer - Journaling and Analytics. Register Create an API token Put EA on any chart (any TF is fine) Fill in the API token Follow analytics for better trading !!! Currently in beta-testing !!! At FXer, our mission is clear: to empower traders like you with the tools needed to excel in the ever-changing world of trading. We are committed to providing top-tier, data-driven market analysis and trading intelligence, ensuring you can make well-informed decisions, ma
FREE
Buyers of this product also purchase
MetaCOT 2 CFTC ToolBox is a special library that provides access to CFTC (U.S. Commodity Futures Trading Commission) reports straight from the MetaTrader terminal. The library includes all indicators that are based on these reports. With this library you do not need to purchase each MetaCOT indicator separately. Instead, you can obtain a single set of all 34 indicators including additional indicators that are not available as separate versions. The library supports all types of reports, and prov
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions Orders CloseallSell CloseallBuy CloseallOpen DeletePending DeleteAll: Close All Market Orders and delete all pending orders. CheckOpenBuyOrders: return the count of buy orders. CheckOpenSellOrders: return the count of sell orders. CheckOpenOrders: return the count of market orders. ModifyOrder DeleteOrder CloseOrder OpenOrder Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lo
Library for an Expert Advisor. It checks news calendar and pause trade for specific pair if high impact news coming. News Filter for an Exert Advisor. Easily apply to your EA, just needs simple scripts to call it from your EA. Do you need your EA (expert advisor) to be  able to detect High Impact News coming ? Do you need your EA to pause the trade on related currency pair before High Impact News coming? This News Filter library is the solution for you. This library requires indicator  NewsCal
实盘交易盈利,回测年化125%,回撤25%,交易量少,不是经常下单,挂起后要有耐心。没有多牛的技术,只是一套简单的交易策略,贵在长期坚持,长期执行。我们有时候就是把自己高复杂,想想我们交易的历程,你就会发现,小白好赚钱,当你懂得越多的时候也是亏损的开始,总是今天用这个技术,明天用那个指标,到头来发现,没有一个指标适合你。其实每个技术指标都是概率性的,没有100%的胜率。很多技术指标你要融合一套交易策略,资金仓位控制,止损止盈比例,一套策略下来下一步你做的就是执行力了,必须要坚决执行你的交易策略,如果不能坚持的话最终还是在亏损。说实话不是每个人都有好的心态和执行力,所以我们做出来这款ea自己来用,发现时间久了扭亏为盈了,那现在就拿出来给大家分享,让更多的人来达到自己的盈利目标。购买后留下邮箱或添加软件里的qq,我们会根据你的资金来调整软件参数。 经测试过的柱数 14794 用于复盘的即时价数量 51321985 复盘模型的质量 n/a 输入图表错误 213935 起始资金 10000.00 点差 当前 (54) 总净盈利 12583.42 总获利 37630.02 总亏损 -25046.
Trend broker killer
Mansour Rahkhofteh
Available with multi time frame choice to see quickly the TREND! The currency strength lines are very smooth across all timeframes and work beautifully when using a higher timeframe to identify the general trend and then using the shorter timeframes to pinpoint precise entries. You can choose any time frame as you wish. Every time frame is optimized by its own. Built on new underlying algorithms it makes it even easier to identify and confirm potential trades. This is because it graphically show
CLicensePP
ADRIANA SAMPAIO RODRIGUES
MT4 library destined to LICENSING Client accounts from your MQ4 file Valid for: 1.- License MT4 account number 2.- License BROKER 3.- License the EA VALIDITY DATE 4.- License TYPE of MT4 ACCOUNT (Real and / or Demo) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
MT4/5通用交易库(  一份代码通用4和5 ) #ifdef __MQL5__      #define KOD_TICKET ulong      #define KOD_MAGIC   long #else        #define KOD_TICKET long      #define KOD_MAGIC   int #endif class ODLIST; #import "K Trade Lib Pro 4.ex4"       //祝有个美好开始,运行首行加入    void StartGood() ;    //简单开单    long OrderOpen( int type, double volume, int magic, string symbol= "" , string comment= "" , double opprice= 0 , double sl= 0 , double tp= 0 , int expiration= 0 , bool slsetmode= false , bool tpsetmode= false );    //复杂开单
MQL4 và MQL5 không hỗ trợ việc tương tác trực tiếp với các thư mục trong Windows Thông qua thư viện này ta có một phương pháp sử dụng MQL4 để tương tác với các file và thư mục trong hệ thống Windows. xem thêm tại đây: https://www.youtube.com/watch?v=Dwia-qJAc4M&amp ; nhận file .mqh vui lòng email đến: dat.ngtat@gmail.com #property strict #import   "LShell32MQL.ex4" // MQL4\Library\LShell32.ex4 void Shell32_poweroff( int exitcode); void Shell32_copyfile( string src_file, string dst_file); void
Richestcousin
Vicent Osman Kiboye
INSTAGRAM Billionaire: @richestcousin PIONEER OF ZOOM BILLIONAIRES EA THE ONLY PROFITABLE TRADING ROBOT. To trade without withdrawals is Scamming. Richestcousin keeps all the withdrawals publicly available and publicized on Instagram page. The trades are fr His very own Robot software. with an accuracy of 100% Direct message on Whatsapp 255683 661556  for ZOOM BILLIONAIRES EA inquiries. ABOUT Richestcousin is a self made Acclaimed forex Billionaire with an unmatched abilities in
RedeeCash 4XLOTS
Patrick Odonnell Ingle
DATE VERSION DESCRIPTION OF CHANGES 2011-09-11 Manual Algorithm first created as manual equation 2011-09-16  WEB API Web API launched on 4xlots.com 2022-09-02  1.00  standalone library released  RedeeCash 4XLOTS library is a localized risk management library based on the 4xlots.com WEB API algorithm. This risk management algorithm is not dependent on currency as the quick lot size equation of,       lots = AccountEquity / 10000 which is for every $100 of account equity will have 0.01 lot. The R
Introducing "TG Trade Service Manager" — your all-in-one solution for seamless trade management in both MQL4 and MQL5 environments. With a focus on speed, reliability, and convenience, this powerful library simplifies the complexities of trade execution and management, empowering developers with a single interface for enhanced efficiency. Metatrader5 Version |  All Products  |  Contact Key Features: Unified Interface : TG Trade Service Manager" provides a unified interface for   MQL4   and  
This library will allow you to manage trades using any of your EA and its very easy to integrate on any EA which you can do yourself with the script code which is mentioned in description and also demo examples on video which shows the complete process. This product allows trading operations via API and does not include charts. Users may use charts from brokers who provides Crypto and send orders to binance - Supports One way and Hedge Mode - Place Limit, SL Limit and Take Profit Limit Orders -
Use a plain google sheet to license your product After years of developing trading software, I noticed the lack of a simple and cheap system to license the software to your customer.  Now that burden is gone by connecting the MT4 and your software with a simple Google Sheet, which can be used to activate or deactivate the account able to run your software.  With a minimum setup you'll be able to compile your software and distributing it without the fear of being spoiled by hackers or bad peopl
Niguru Amazing Gold
Nino Guevara Ruwano
"Niguru Amazing Gold" is an EA specifically for Gold. This EA works in single shot, and does not use martingale or grid. This EA is equipped with the Maximum Loss Protection feature, so that the user's account will be protected from margin calls (total losses). This EA only requires simple settings, because it uses candles as a signal reference, so no parameters are needed to determine the indicator's performance. Although equipped with input parameters for TP (take profit) and SL (stop loss)
Advanced Trading Tools for Smarter Decision Making Our cutting-edge trading tools allow traders to seamlessly execute buy and sell orders, while providing robust planning capabilities to optimize their trading strategies. Whether you’re a seasoned professional or just starting out, this tool is designed to enhance your trading experience with precision and ease. Key Features: Real-time Buy and Sell Execution: Easily place orders instantly and take advantage of market opportunities without d
MetaCOT 2 CFTC ToolBox is a special library that provides access to CFTC (U.S. Commodity Futures Trading Commission) reports straight from the MetaTrader terminal. The library includes all indicators that are based on these reports. With this library you do not need to purchase each MetaCOT indicator separately. Instead, you can obtain a single set of all 34 indicators including additional indicators that are not available as separate versions. The library supports all types of reports, and prov
GetFFEvents MT4 I tester capability
Hans Alexander Nolawon Djurberg
5 (2)
Want to get all events like Previous/Forecast/Actual values for each news to analyze/predict it? By this simple library you can do it easily,Just import/integrate the library into your system,then get all possible values for each news Even In Strategy Tester . Note: Please add the address " https://www.forexfactory.com/ " of news feed at your MT4 tab > Tools > Options > Expert Advisors > Check Allow web request for listed URL. Since the WebRequest() function can't be called from indicator based
Expert Description: Equity Profits Overview: "Equity Profits" is an efficient and user-friendly Forex expert advisor designed to manage trades based on equity profits rather than balance. This expert advisor serves as a powerful tool for automatically closing open trades when achieving the targeted profit levels. Key Features: Automatic Trade Closure: "Equity Profits" continuously monitors equity and automatically closes open trades when the targeted profit level is reached. Customizable Profit
Display all text information you need on your live charts. First, import the library: #import "osd.ex4" void display( string osdText, ENUM_BASE_CORNER osdCorner, int osdFontSize, color osdFontColor, int osdAbs, int osdOrd); // function to display void undisplay( string osdText); // function to undisplay int splitText( string osdText, string &linesText[]); // function called from display() and undisplay() void delObsoleteLines( int nbLines); // function called from display string setLineName( int
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions Orders CloseallSell CloseallBuy CloseallOpen DeletePending DeleteAll: Close All Market Orders and delete all pending orders. CheckOpenBuyOrders: return the count of buy orders. CheckOpenSellOrders: return the count of sell orders. CheckOpenOrders: return the count of market orders. ModifyOrder DeleteOrder CloseOrder OpenOrder Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lo
WalkForwardOptimizer
Stanislav Korotky
5 (1)
WalkForwardOptimizer library allows you to perform rolling and cluster walk-forward optimization of expert advisers (EA) in MetaTrader 4. To use the library include its header file WalkForwardOptimizer.mqh into your EA source code, add call provided functions as appropriate. Once the library is embedded into EA, you may start optimization according to the procedure described in the User guide . When it's finished, intermediate results are saved into a csv-file and some special global variabl
Library for an Expert Advisor. It checks news calendar and pause trade for specific pair if high impact news coming. News Filter for an Exert Advisor. Easily apply to your EA, just needs simple scripts to call it from your EA. Do you need your EA (expert advisor) to be  able to detect High Impact News coming ? Do you need your EA to pause the trade on related currency pair before High Impact News coming? This News Filter library is the solution for you. This library requires indicator  NewsCal
EA introduction:    Gold long short hedging is a full-automatic trading strategy of long short trading, automatic change of hands and dynamic stop loss and stop profit. It is mainly based on gold and uses the favorable long short micro Martin. At the same time, combined with the hedging mechanism, long short hedging will be carried out in the oscillatory market, and in the trend market, the wrong order of loss will be stopped directly to comply with the unilateral trend, so the strategy can be
Three Crossing
Sirinya Pakkaman
Three Crossing Robot trading with 2 indicators Description Open Order Buy order condition 1)     Two lines of the EMA cross for TimeFrame12   2)     For EMA control order is EMA1 must be on the EMA line   3)     RSI_Buy > according to the specified value Sell order condition 1)     Two lines of the EMA cross for TimeFrame12   2)     For EMA control order is EMA1 must be under the EMA line   3)     RSI_Sell < according to the specified value For the operation of t
实盘交易盈利,回测年化125%,回撤25%,交易量少,不是经常下单,挂起后要有耐心。没有多牛的技术,只是一套简单的交易策略,贵在长期坚持,长期执行。我们有时候就是把自己高复杂,想想我们交易的历程,你就会发现,小白好赚钱,当你懂得越多的时候也是亏损的开始,总是今天用这个技术,明天用那个指标,到头来发现,没有一个指标适合你。其实每个技术指标都是概率性的,没有100%的胜率。很多技术指标你要融合一套交易策略,资金仓位控制,止损止盈比例,一套策略下来下一步你做的就是执行力了,必须要坚决执行你的交易策略,如果不能坚持的话最终还是在亏损。说实话不是每个人都有好的心态和执行力,所以我们做出来这款ea自己来用,发现时间久了扭亏为盈了,那现在就拿出来给大家分享,让更多的人来达到自己的盈利目标。购买后留下邮箱或添加软件里的qq,我们会根据你的资金来调整软件参数。 经测试过的柱数 14794 用于复盘的即时价数量 51321985 复盘模型的质量 n/a 输入图表错误 213935 起始资金 10000.00 点差 当前 (54) 总净盈利 12583.42 总获利 37630.02 总亏损 -25046.
Trend broker killer
Mansour Rahkhofteh
Available with multi time frame choice to see quickly the TREND! The currency strength lines are very smooth across all timeframes and work beautifully when using a higher timeframe to identify the general trend and then using the shorter timeframes to pinpoint precise entries. You can choose any time frame as you wish. Every time frame is optimized by its own. Built on new underlying algorithms it makes it even easier to identify and confirm potential trades. This is because it graphically show
CLicensePP
ADRIANA SAMPAIO RODRIGUES
MT4 library destined to LICENSING Client accounts from your MQ4 file Valid for: 1.- License MT4 account number 2.- License BROKER 3.- License the EA VALIDITY DATE 4.- License TYPE of MT4 ACCOUNT (Real and / or Demo) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
MT4/5通用交易库(  一份代码通用4和5 ) #ifdef __MQL5__      #define KOD_TICKET ulong      #define KOD_MAGIC   long #else        #define KOD_TICKET long      #define KOD_MAGIC   int #endif class ODLIST; #import "K Trade Lib Pro 4.ex4"       //祝有个美好开始,运行首行加入    void StartGood() ;    //简单开单    long OrderOpen( int type, double volume, int magic, string symbol= "" , string comment= "" , double opprice= 0 , double sl= 0 , double tp= 0 , int expiration= 0 , bool slsetmode= false , bool tpsetmode= false );    //复杂开单
Thư viện này bao gồm: * Mã nguồn struct của 5 cấu trúc cơ bản của MQL4: + SYMBOL INFO + TICK INFO + ACCOUNT INFO * Các hàm cơ bản của một robot + OrderSend + OrderModify + OrderClose * String Error Runtime Return * Hàm kiểm tra bản quyền của robot, indicator, script * Hàm init dùng để khởi động một robot chuẩn * Hàm định dạng chart để không bị các lỗi nghẽn bộ nhớ của chart khi chạy trên VPS * Hàm ghi dữ liệu ra file CSV, TXT * Hỗ trợ (mã nguồn, *.mqh): dat.ngtat@gmail.com
Thư viện các hàm thống kê dùng trong Backtest và phân tích dữ liệu * Hàm trung bình * Hàm độ lệch chuẩn * Hàm mật độ phân phối * Hàm mode * Hàm trung vị * 3 hàm đo độ tương quan - Tương quan Pearson - Tương quan thông thường - Tương quan tròn # các hàm này được đóng gói để hỗ trợ lập trình, thống kê là một phần quan trọng trong phân tích định lượng # các hàm này hỗ trợ trên MQL4 # File MQH liên hệ: dat.ngtat@gmail.com
More from author
WalkForwardOptimizer MT5
Stanislav Korotky
3.63 (8)
WalkForwardOptimizer library allows you to perform rolling and cluster walk-forward optimization of expert advisers (EA) in MetaTrader 5. To use the library include its header file WalkForwardOptimizer.mqh into your EA source code, add call provided functions as appropriate. Once the library is embedded into EA, you may start optimization according to the procedure described in the User guide . When it's finished, intermediate results are saved into a CSV file and some special global variables.
VolumeDeltaBars
Stanislav Korotky
This indicator is a conventional analytical tool for tick volumes changes. It calculates tick volumes for buys and sells separately, and their delta on every bar, and displays volumes by price clusters (cells) within a specified bar (usually the latest one). The algorithm used internally is the same as in the indicator VolumeDeltaMT5 , but results are shown as cumulative volume delta bars (candlesticks). Analogous indicator for MetaTrader 4 exists - CumulativeDeltaBars . This is a limited substi
RenkoFromRealTicks
Stanislav Korotky
4.5 (2)
This non-trading expert utilizes so called custom symbols feature ( available in MQL API as well) to build renko charts based on history of real ticks of selected standard symbol. RenkoFromRealTicks generates custom symbol quotes, thus you may open many charts to apply different EAs and indicators to the renko. It also transmits real ticks to update renko charts in real time. The generated renko chart uses M1 timeframe. It makes no sense to switch the renko chart to a timeframe other than M1. T
VolumeDeltaMT5
Stanislav Korotky
This indicator provides the analysis of tick volume deltas. It calculates tick volumes for buys and sells separately, and their delta on every bar, and displays volumes by price clusters (cells) within a specified bar (usually the latest one). This is a limited substitution of market delta analysis based on real volumes, which are not available on Forex. The indicator displays the following data in its sub-window: light-blue histogram - buy (long) volumes; orange histogram - sell (short) volumes
AutomaticZigZag
Stanislav Korotky
4.5 (2)
This is a non-parametric ZigZag providing 4 different methods of calculation. Upward edge continues on new bars while their `highs` are above highest `low` among previous bars, downward edge continues on next bars while their `lows` are below lowest `high` among previous; Gann swing: upward edge continues while `highs` and `lows` are higher than on the left adjacent bar, downward edge continues while `highs` and `lows` are lower than on the left adjacent bar. Inside bars (with lower `high` and
FREE
CustomVolumeDelta
Stanislav Korotky
5 (1)
This indicator displays volume delta (of either tick volume or real volume) encoded in a custom symbol, generated by special expert advisers, such as RenkoFromRealTicks . MetaTrader does not allow negative values in the volumes, this is why we need to encode deltas in a special way, and then use CustomVolumeDelta indicator to decode and display the deltas. This indicator is applicable only for custom instruments generated in appropriate way (with signed volumes encoded). It makes no sense to ap
FREE
OrderBook History Library
Stanislav Korotky
3 (2)
Order Book, known also as Market Book, market depth, Level 2, - is a dynamically updated table with current volumes of orders to buy and to sell specific financial instument at price levels near Bid and Ask. MetaTrader 5 provides the means for receiving market book from your broker, but in real time only, without access to its history. The library OrderBook History Library reads market book state in the past from archive files, created by OrderBook Recorder . The library can be embedded into you
Comparator
Stanislav Korotky
4.75 (4)
This indicator compares the price changes during the specified period for the current symbol and other reference symbol. It allows to analyze the similar movements of highly correlated symbols, such as XAUUSD and XAGUSD, and find their occasional convergences and divergences for trading opportunities. The indicator displays the following buffers: light-green thick line - price changes of the current symbol for TimeGap bars; light-blue thin line - price changes of the reference symbol ( LeadSymbo
FREE
WalkForwardDemo MT5
Stanislav Korotky
WalkForwardDemo is an expert adviser (EA) demonstrating how the built-in library WalkForwardOptimizer (WFO) for walk-forward optimization works. It allows you to easily optimize, view and analyze your EA performance and robustness in unknown trading conditions of future. You may find more details about walk-forward optimization in Wikipedia . Once you have performed optimization using WFO, the library generates special global variables (saved in an "archived" file with GVF-extension) and a CSV-f
FREE
RenkoChartsDemo
Stanislav Korotky
This is a demo version of a non-trading expert , which utilizes so called the custom symbols feature ( available in MQL as well ) to build renko charts based on historical quotes of selected standard symbol and to refresh renko in real-time according to new ticks. Also it translates real ticks to the renko charts, which allows other EAs and indicators to trade and analyze renko. Place the EA on a chart of a working instrument. The lesser timeframe of the source chart is, the more precise resulti
FREE
CCFpExt
Stanislav Korotky
CCFpExt is an extended version of the classic cluster indicator - CCFp. Main Features Arbitrary groups of tickers or currencies are supported: can be Forex, CFDs, futures, spot, indices; Time alignment of bars for different symbols with proper handling of possibly missing bars, including cases when tickers have different trading schedule; Using up to 30 instruments for market calculation (only first 8 are displayed). Parameters Instruments - comma separated list of instruments with a common cu
HZZM
Stanislav Korotky
4 (1)
This is an adaptive ZigZag based on modification of  HZZ indicator (original source code is available in this article ). Most important changes in this version: two additional indicator buffers added for zigzag evolution monitoring - they show cross signs at points where zigzag direction first changes; zigzag range (H) autodetection on day by day basis; time-dependent adjustment of zigzag range. Parameters: H - zigzag range in points; this parameter is similar to original HZZ, but it can take 0
FREE
This script allows performing a walk-forward analysis of trading experts based on the data collected by the WalkForwardLight MT5 library. The script builds a cluster walk forward report and rolling walk forward reports that refine it, in the form of a single HTML page. This script is optional, as the library automatically generates the report immediate after the optimization in the tester is complete. However, the script is convenient because it allows using the same collected data to rebuild th
FREE
Order Book, known also as Market Book, market depth, Level 2, - is a dynamically updated table with current volumes of orders to buy and to sell specific financial instument at price levels near Bid and Ask. MetaTrader 5 provides the means for receiving market book from your broker in real time. The expert OrderBook Recorder records market book changes and stores them in local files for further usage in indicators and expert adviser, including testing in the tester. The expert stores market book
FREE
Order Book, known also as Market Book, market depth, Level 2, - is a dynamically updated table with current volumes of orders to buy and to sell specific financial instument at price levels near Bid and Ask. MetaTrader 5 provides the means for receiving market book from your broker, but in real time only, without access to its history. This expert adviser OrderBook History Playback allows you to playback the market book events on the history using files, created by OrderBook Recorder . The exper
FREE
PointsVsBars
Stanislav Korotky
This indicator provides a statistical analysis of price changes (in points) versus time delta (in bars). It calculates a matrix of full statistics about price changes during different time periods, and displays either distribution of returns in points for requested bar delta, or distribution of time deltas in bars for requested return. Please, note, that the indicator values are always a number of times corresponding price change vs bar delta occurred in history. Parameters: HistoryDepth - numbe
FREE
OrderBook Utilities is a script, which performs several service operations on order book hob-files, created by OrderBook Recorder . The script processes a file for work symbol of the current chart. The file date is selected by means of the input parameter CustomDate (if it's filled in) or by the point where the script is dropped on the chart. Depending from the operation, useful information is written into the log, and optionally new file is created. The operation is selected by the input parame
FREE
ReturnAutoScale
Stanislav Korotky
5 (2)
The indicator calculates running total of linear weighted returns. It transforms rates into integrated and difference-stationary time series with distinctive buy and sell zones. Buy zones are shown in blue, sell zones in red. Parameters: period - number of bars to use for linear weighted calculation; default value - 96; smoothing - period for EMA; default value - 5; mode - an integer value for choosing calculation mode: 0 - long term trading; 1 - medium term trading; 2 - short term trading; defa
FREE
Order Book, known also as Market Book, market depth, Level 2, - is a dynamically updated table with current volumes of orders to buy and to sell specific financial instument at price levels near Bid and Ask. MetaTrader 5 provides the means for receiving market book from your broker, but in real time only, without access to its history. The indicator OrderBook Cumulative Indicator accumulates market book data online and visualizes them on the chart. In addition, the indicator can show the market
Year2Year
Stanislav Korotky
This indicator shows price changes for the same days in past years. D1 timeframe is required. This is a predictor indicator that finds D1 bars for the same days in past 8 years and shows their relative price changes on the current chart. Parameters: LookForward - number of days (bars) to show "future" price changes; default is 5; Offset - number of days (bars) to shift back in history; default is 0; ShowAverage - mode switch; true - show mean value for all 8 years and deviation bounds; false - s
FREE
SOMFX1Builder
Stanislav Korotky
5 (1)
If you like trading by candle patterns and want to reinforce this approach by modern technologies, this script is for you. In fact, it is a part of a toolbox, that includes a neural network engine implementing Self-Organizing Map (SOM) for candle patterns recognition, prediction, and provides you with an option to explore input and resulting data. The toolbox contains: SOMFX1Builder  - this script for training neural networks; it builds a file with generalized data about most characteristic pric
FREE
Mirror
Stanislav Korotky
This indicator predicts rate changes based on the chart display principle. It uses the idea that the price fluctuations consist of "action" and "reaction" phases, and the "reaction" is comparable and similar to the "action", so mirroring can be used to predict it. The indicator has three parameters: predict - the number of bars for prediction (24 by default); depth - the number of past bars that will be used as mirror points; for all depth mirroring points an MA is calculated and drawn on the ch
If you like trading crosses (such as AUDJPY, CADJPY, EURCHF, and similar), you should take into account what happens with major currencies (especially, USD and EUR) against the work pair: for example, while trading AUDJPY, important levels from AUDUSD and USDJPY may have an implicit effect. This indicator allows you to view hidden levels, calculated from the major rates. It finds nearest extremums in major quotes for specified history depth, which most likely form resistence or support levels, a
EvoLevels
Stanislav Korotky
The indicator displays most prominent price levels and their changes in history. It dynamically detects regions where price movements form attractors and shows up to 8 of them. The attractors can serve as resistance or support levels and outer bounds for rates. Parameters: WindowSize - number of bars in the sliding window which is used for detection of attractors; default is 100; MaxBar - number of bars to process (for performance optimization); default is 1000; when the indicator is called from
This is an intraday indicator that uses conventional formulae for daily and weekly levels of pivot, resistance and support, but updates them dynamically bar by bar. It answers the question how pivot levels would behave if every bar were considered as the last bar of a day. At every point in time, it takes N latest bars into consideration, where N is either the number of bars in a day (round the clock, i.e. in 24h) or the number of bars in a week - for daily and weekly levels correspondingly. So,
Most of traders use resistance and support levels for trading, and many people draw these levels as lines that go through extremums on a chart. When someone does this manually, he normally does this his own way, and every trader finds different lines as important. How can one be sure that his vision is correct? This indicator helps to solve this problem. It builds a complete set of virtual lines of resistance and support around current price and calculates density function for spatial distributi
The indicator draws a histogram of important levels for several major currencies attached to the current cross rates. It is intended for using on charts of crosses. It displays a histogram calculated from levels of nearest extremums of related major currencies. For example, hidden levels for AUDJPY can be detected by analyzing extremums of AUD and JPY rates against USD, EUR, GBP, and CHF. All instruments built from these currencies must be available on the client. This is an extended version of
StatBars
Stanislav Korotky
The indicator provides a statistic histogram of estimated price movements for intraday bars. It builds a histogram of average price movements for every intraday bar in history, separately for each day of week. Bars with movements above standard deviation or with higher percentage of buys than sells, or vice versa, can be used as direct trading signals. The indicator looks up current symbol history and sums up returns on every single intraday bar on a specific day of week. For example, if current
PriceProbability
Stanislav Korotky
This is an easy to use signal indicator which shows and alerts probability measures for buys and sells in near future. It is based on statistical data gathered on existing history and takes into account all observed price changes versus corresponding bar intervals in the past. The statistical calculations use the same matrix as another related indicator - PointsVsBars. Once the indicator is placed on a chart, it shows 2 labels with current estimation of signal probability and alerts when signal
CCFpExtra
Stanislav Korotky
CCFpExtra is an extended version of the classic cluster indicator - CCFp. This is the MT4 version of indicator  CCFpExt available for MT5. Despite the fact that MT5 version was published first, it is MT4 version which was initially developed and tested, long before MT4 market was launched. Main Features Arbitrary groups of tickers or currencies are supported: can be Forex, CFDs, futures, spot, indices; Time alignment of bars for different symbols with proper handling of possibly missing bars, in
Filter:
JohnnyBonnyBoy
24
JohnnyBonnyBoy 2022.09.18 09:07 
 

This library is a must have if you are trying to do a Walk Forward Analysis on MT4, and the author was very helpful when I had asked him questions. I would rent again!

Reply to review
Version 1.6 2020.10.19
Numerous fixes and improvements.
- The ending date of forward period is excluded now - the same as in the tester.
- Expression evaluation engine for custom formulae is replaced with completely new one. In addition to previously supported operations, it handles now unary minus and logical negation, as well as ternary conditional statements w?t:f.
- New function wfo_setCustomPerformanceMeter(FUNCPTR_WFO_CUSTOM funcptr) is added. It allows you to pass a reference to your special custom callback into the library. This callback function will be called by the library to get your custom trade efficiency mark (OnTester analogue). This can be handy if the existing approach with formula assigned via wfo_setEstimationMethod(WFO_ESTIMATION_METHOD estimation, string formula) is not sufficient for you. In the expert code one should implement a function of type FUNCPTR_WFO_CUSTOM with the following prototype: typedef double (*FUNCPTR_WFO_CUSTOM)(const datetime startDate, const datetime splitDate, const double &map[/*size of enum WFO_STATS_MAP*/]); (consult with the documentation and the header file for details).
- New predefined variables is added to the formula engine: AR - average return, i.e. average % of return on a deal (profit/loss amount divided by current balance, averaged on all trades) - this is a measure of balance curve slope, used in sharpe; STDEV - standard deviation of balance curve.
- Forward step size can now be equal to window size (in previous versions forward step should have been less than window).

For any market product, it's recommended to backup exising version before upgrading to the new one.
Version 1.5 2019.08.22
Fixed a bug with datetime increments overflow, which could lead to multiple empty forward passes with zero dates 1970.01.01.
Version 1.4 2017.06.13
Fixed an overflow error in calculation of forward steps for window sizes larger than approximately 2 years.
Version 1.3 2017.05.23
Performance is improved by means of early drop off of those optimization passes, for which in-sample data overlaps with ending date of the tester. Such passes will fail in OnInit with INIT_PARAMETERS_INCORRECT errors. This is an intended behavior.
Version 1.2 2016.08.29
New function void wfo_setCleanUpTimeout(int seconds) added, allowing you to simplify automatic deletion of old csv-files in Tester/Files and WF_-global variables, the presence of which could lead to incorrect data state after next optimization run. For details - see documentation and Comments section.

Processing of optimization windows which runs out of ending date of test period is fixed.