Framework & template · MT5

MQL5 Walk Forward Optimization Library

by RustyKanuck

This MetaTrader 5 framework provides a library and a template expert advisor designed for walk-forward optimization.

GitHub stars4
Forks0
Last update1 year ago21 Jun 2025
LicenceNone stated

Overview

MQL5 Walk Forward Optimization Library enables developers to test strategies across moving windows of historical data to verify performance stability. The included template expert advisor demonstrates basic trade management, featuring parameters for fixed lot sizes or risk-based calculations. It includes built-in risk controls such as stop loss, take profit, and trailing stop triggers. The repository is intended as a foundation for building robust systems rather than a standalone ready-to-trade robot.

Details

Author

RustyKanuck on GitHub

Type

Framework & template

Platform

MetaTrader 5 (MQL5)

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input parameters

Read from WFA_EA_template v.2.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
Lotsdouble0.1
RiskPercentdouble2.0RiskPercent (0 = Fix)
OrderDistPointsint100
TpPointsint100
SlPointsint100
TslPointsint5
TslTriggerPointsint5
TimeframeENUM_TIMEFRAMESPERIOD_H1
BarsNint5
ExpirationHoursint50
Magicint111

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone RustyKanuck/mql5_walk_forward from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

EA31337 Classes

by EA31337
269 stars

This development framework provides a comprehensive MQL library for building Expert Advisors, indicators, and scripts across MetaTrader 4 and 5 platforms. It facilitates cross-platform compatibility by offering a unified API that allows developers to port MQL4 code to MQL5 with minimal modifications. The library includ

MT5 Framework & template
Updated 5 months ago GPL-3.0 GitHub repository of EA31337 Classes
234 stars

This is a modular MetaTrader 5 expert advisor framework designed to accelerate the development of custom trading strategies. It provides a standardized base that includes position management, risk controls, and multi-symbol support. The template features configurable entry and exit logic, integrated stop loss and take

MT5 Framework & template Martingale High risk

ICT Library MQ5

by xxvw
205 stars

This MetaTrader 5 library and expert advisor automates Smart Money Concepts (SMC) and Inner Circle Trader (ICT) methodologies. It identifies market structure shifts, breaks of structure, order blocks, and liquidity zones. The system features a confluence-based entry mechanism that evaluates signals against kill zones,

MT5 Framework & template SMC / ICT / price action

Roffild Library

by Roffild
120 stars

Roffild Library is an extensive framework and collection of expert advisors for MetaTrader 5 that bridges MQL5 with modern data science tools. It provides functional implementations for machine learning models, specifically Multilayer Perceptron neural networks and Random Forests via the AlgLib library. The project fac

MT5 Framework & template AI / machine learning
Updated 6 years ago Apache-2.0 GitHub repository of Roffild Library

Orchard Forex Framework 3

by OrchardForexTutorials
64 stars

Orchard Forex Framework 3 is an educational development library for MetaTrader 5. It provides a structured foundation for building Expert Advisors using object-oriented programming. The repository includes base classes for handling trades, managing positions, and integrating common technical indicators like RSI, MACD,

MT5 Framework & template Grid High risk
36 stars

This repository contains the MQL source code used by Forex Strategy Builder Professional to export automated trading strategies to MetaTrader 4 and MetaTrader 5. It serves as a standardized template for executing technical strategies generated by the software, handling order execution and trade management. The EA inclu

MT4MT5 Framework & template Multi-strategyMartingale High risk
Updated 4 years ago None stated GitHub repository of FSB Pro Expert Advisor

More frameworks and templates

Need a broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers