Lot Size Library for Any Volume Step

This library returns the largest lot whose loss at your stop does not exceed the money you allow it to risk, correct for any volume step, tick size and tick value the symbol reports.

I wrote it for the MQL5 developer who has pasted a lot-normalising block into every EA and can no longer say which copy is right. One import, one version, and a call that refuses rather than oversizing.

WHAT IT DOES

  • It refuses instead of oversizing: when the smallest lot the symbol accepts would risk more than your limit, the call returns -6 instead of a bigger lot.
  • Legal on any step: the size is floored onto the symbol's own step and never rounded up, so a 0.001-step symbol and a 0.25-step instrument are handled without a decimal count typed by hand.
  • Three ways to state the risk: a money amount, a percentage of balance or equity, or a distance in points, plus the inverse call that says what a given volume risks.
  • You cannot pass a wrong tick size: the library reads the symbol's volume and tick specification itself, at the moment of the call.
  • A sentence for every code: nine error values, each with plain text that says what to check.
  • No state and no orders: it returns a number, never sends, modifies or closes an order, and two calls with the same inputs in the same tick return the same value.

HOW IT WORKS

1. Put chimaster_lots.ex5 in MQL5\Libraries, under your terminal's data folder, and paste the import block below into the EA.

2. Call a sizing function with the symbol, the money you allow it to risk and the distance from entry to stop.

3. Read the number: a positive value is a size, and a negative value is an error code that CMS_ErrorText turns into a sentence.

THE TWELVE CALLS

#import "chimaster_lots.ex5"

double CMS_VolumeMin(const string symbol);

double CMS_VolumeMax(const string symbol);

double CMS_VolumeStep(const string symbol);

int CMS_VolumeDigits(const string symbol);

double CMS_NormalizeVolume(const string symbol, const double requestedVolume);

double CMS_MoneyPerLot(const string symbol, const double priceDistance);

double CMS_LotFromRiskMoney(const string symbol, const double riskMoney, const double stopDistancePrice);

double CMS_LotFromRiskPercent(const string symbol, const double riskPercent, const double stopDistancePrice, const int riskBase);

double CMS_LotFromRiskPoints(const string symbol, const double riskMoney, const double stopPoints);

double CMS_RiskOfVolume(const string symbol, const double volume, const double priceDistance);

string CMS_ErrorText(const int code);

string CMS_Version();

#import

The first four read the symbol's volume specification. CMS_MoneyPerLot turns a price distance into the loss of one lot. CMS_LotFromRiskMoney, CMS_LotFromRiskPercent and CMS_LotFromRiskPoints return the size from money, from a percentage of balance or equity, and from points; the percentage call takes 0 for balance and 1 for equity as its last argument. CMS_RiskOfVolume is the inverse. CMS_ErrorText and CMS_Version are the two string calls.

THE ERROR CODES

-1 unknown symbol, -2 volume specification unusable, -3 tick specification unusable, -4 distance not positive, -5 risk amount out of range, -6 the minimum lot risks more than you asked, -7 an input is not finite or is out of range, -8 the risk base is not 0 or 1, -9 no balance or equity to take a percentage from.

GOOD TO KNOW

  • Compiled, not source, and the money figure is an estimate: you receive the compiled library, and money per lot uses the terminal's tick-value loss at the moment of the call, with no commission, swap or fee.
  • No stop or margin checks: you supply the distance from entry to stop, and the library does not validate stop levels, freeze levels or margin.
  • One order's worth: it clamps to the symbol's maximum volume and does not split a larger size, and it does not apply the symbol's total volume limit.
  • One step from my panel: this library floors with a relative tolerance, so 0.3 lots on a 0.1-step symbol stays 0.3, where a plain floor gives 0.2. My Smart Risk and Lot Size Panel floors plainly, so the two can differ by one step there; both are legal, and neither risks more than the formula.

BEFORE YOU TRUST IT

The MQL5 compiler does not link-check an import: a missing library still compiles at 0 errors, and the failure appears when the terminal loads the code. So check the file. Paste the import block into an empty script, add Print(CMS_Version());, compile it and run it on any chart. It prints 1.00 when the terminal has loaded this build.

QUESTIONS I EXPECT

Will my EA compile without the library? Yes, and that is the trap: the compiler does not read the .ex5, so a missing file compiles cleanly and fails at load time. The version check above is the fast answer.

My broker's minimum is not a multiple of the step. Then the symbol specification is inconsistent. The library returns that minimum unchanged, and the server may reject the order when you send it.

Does it place or manage trades? No. It returns a number, and your EA decides what to do with it.

COMPATIBILITY

Any MT5 account type. Native MQL5, no DLLs.

SUPPORT

Questions through the MQL5 message system. First reply within two working days.

If you have used it, I would welcome a short review of what worked and what did not.

推荐产品
MultiTimeframe Info Feed (MIF) Indicator Description: MultiTimeframe Info Feed (MIF) is a smart MQL5 indicator that displays a dynamic, real-time info panel directly on your chart, offering powerful insight into current market conditions. Key features include: Real-time display of Open, High, Low, Close, and live Tick price Tick Rate (ticks per second) for assessing market activity Auto-calculated Entry Price on new candle formation Signal direction detection (BUY / SELL) Price action pattern re
FREE
INTRODUCING MML Data Bridge The demand for bridging external data and machine learning with trading platforms is higher than ever. MetaTrader 5 is a powerful environment for trading and back testing, but without a data bridge, MT5 is largely isolated from using any external data. MML Bridge is a developer tool that allows users to bridge external data into MT5 for back testing, live trading, and optimization. It's built for ease of use, providing users with a simple function API that drip-feeds
FREE
no Trade operation, Robot Set auto SL to every manually Trade from a Phone Automatic Phone TradeManager Need just Set on 1 Symbol Auto BE Trigger is added that immediately sets a stop-loss for every () But does NOT calculate position size based on risk, allows the fixed  SL to   adjusted dynamically drag on Chart or Menu. It protects capital around the clock, reduces emotional mistakes, and ensures consistent risk management.
FREE
MarketPro toolkit
Johannes Hermanus Cilliers
Start earning profits by copying All trades are sent by our successful Forex trader & are extremely profitable. You can earn profits by copying trades daily Trial Period included You'll also get access to extremely powerful trading education which is designed in a simple way for you to become a profitable trader, even if you have no trading experience. https://ec137gsj1wp5tp7dbjkdkxfr4x.hop.clickbank.net/?cbpage=vip
FREE
================================================================ MATRIX CONDITION MONITOR Live Trade Condition Panel for MetaTrader 5 Fully Automatic -- Works with ALL Matrix EAs ================================================================ NEVER MISS A TRADE SETUP AGAIN Matrix Condition Monitor is a free utility that attaches to any chart and automatically checks all 10 trade conditions in real time -- showing you exactly why a trade will or will not open, and alerting you the moment ever
FREE
Modern Dark Chart Theme for MT5 Upgrade your MetaTrader 5 chart into a clean, dark, professional trading workspace. Your chart is your trading office. It is where you analyze the market, test Expert Advisors, review setups, record videos, share screenshots, and make trading decisions. If your MT5 chart looks old, bright, noisy, or unprofessional, your trading environment can feel distracted before you even start your analysis. Modern Dark Chart Theme for MT5 helps you create a cleaner, darker,
FREE
Apex Point
Marco Engstermann
Apex Point is a trend-following indicator for MetaTrader 5, transforming complex market data into signals for traders. It displays blue dots for uptrends, red dots for downtrends, and yellow crosses at potential reversals, helping users identify momentum shifts quickly. Key features include a confirmation system requiring multiple bars (default: 3) to validate changes, reducing false signals; dynamic ATR-based offsets for adaptive trailing, with instant ratcheting in the trend direction and smo
FREE
Mini Charts MTF EMA Mini Charts MTF EMA is a MetaTrader 5 indicator that displays multiple mini charts from selected timeframes directly on the main chart. It helps traders monitor multi-timeframe price movement and EMA direction in one clean visual layout. Main Features Multiple mini charts on the main chart Custom timeframe selection for each mini chart Up to 4 EMA lines for every mini chart Custom EMA period, shift, method, applied price, color, style, and width Custom mini chart width, heigh
FREE
Exact Time — detailed time on the seconds chart. The utility shows the opening time of the selected candle. This is necessary when working with seconds charts. For example, it can be used on a seconds chart built using the Seconds Chart utility. Inputs Base corner — the chart corner to which an object Is attached. X distance — the horizontal distance from the chart corner. Y distance — the vertical distance from the chart corner. Text font — font name Font size — font size Color — text color
FREE
Trade With Price is a powerful and user-friendly MetaTrader 5 Expert Advisor designed to simplify and accelerate your trading execution. This EA provides a smart one-click trading panel that allows traders to instantly place BUY, SELL, and pending orders directly at the current market price—eliminating the need to calculate distances in pips. Key Features One-click BUY & SELL execution Place pending orders based on market price instead of pips Clean and intuitive trading panel interface
FREE
MyGridBasket
Ahmad Aan Isnain Shofwan
Read-only basket analytics library for grid and averaging EAs. Real breakeven, what-if, stress test and stop-out distance. Sends no orders. What it is A library that reads your open positions and tells you the real state of a grid or averaging basket. It does not trade. It sends no orders. It has no entry logic. You call it from your own EA. What it tells you - Breakeven of the basket, with swap and commission counted - The price where the basket nets a money amount you choose - Where the ave
FREE
IMPORTANT NOTE: This is a professional Trade Management Utility and on-chart assistant. It is NOT an automated trading robot. It does not open trades on its own. The UltraFast Trade Manager MT5 is the ultimate execution and risk-management suite designed to give you absolute control over your manual and algorithmic trades. When managing multiple positions, calculating complex net break-even points, or constantly monitoring the economic calendar, hesitation can lead to costly mistakes. This utili
FREE
FiT Panel Pro
Thonglak Janyakorn
Overview FiT Panel Pro is a professional-grade trade management panel designed for MetaTrader 5 traders who demand speed, precision, and full control over their trades. Built with a modern dark-theme UI, it combines one-click execution with advanced risk management, visual SL/TP drag lines, automatic Fibonacci-based levels, and comprehensive order management — all in a single, compact panel. Whether you are a scalper, day trader, or swing trader, FiT Panel Pro gives you the edge you need to exec
FREE
Show Pips for MT5
Roman Podpora
4.5 (32)
对于那些总是想了解帐户当前情况的人来说,此信息指示器将很有用。 VERSION MT 4 -   More useful indicators 该指标显示诸如利润点数、百分比和货币等数据,以及当前货币对的点差以及柱在当前时间范围内收盘的时间。 有多种选项可用于将信息线放置在图表上: 价格右侧(运行在价格后面); 作为评论(在图表的左上角); 在屏幕的选定角落。 还可以选择信息分隔符: | / \ # 该指标易于使用且信息丰富。可以在设置中禁用不必要的信息项目。 设置 外观类型     - 信息行的显示类型。有以下三种选择: 跟随价格     - 遵循价格; 作为评论     - 作为评论; 在屏幕的选定角落     - 在屏幕的选定角落。 附件图角     - 如果您选择屏幕选定角的显示类型,则此项目允许您选择四个捕捉角之一; 显示利润?       - 该参数负责以存款货币显示利润; 以百分比显示利润?       - 该参数负责以百分比形式显示利润; 显示传播?       - 该参数负责显示当前点差; 显示酒吧关闭时间?       - 该参数负责显示柱关闭之前的时间; 文字颜
FREE
EA Master Version any Follow Copy Account  (Acc. Number)  need a open MT Terminal, download multiple times Step1:   Open Master MT5 Terminal    =  install master- Version   (on any Symbol just one Time) Step2:   Open Follower MT5 Terminal = install follower- Version  (on any Symbol just one Time) Step3:   all Trades from any Symbol or any Robot are copy now to follow- Terminal immediately for simple copy set on Chart and   Start   no optimization. This Robot is a Trade Copier for MT5 that automa
FREE
VFI Quantum
Nikita Berdnikov
5 (1)
Introducing VFI (Volume Flow Indicator) – a trading indicator that analyzes the relationship between volume and price movement to identify key trading opportunities. The indicator displays the strength and direction of volume flow, providing clear signals about potential entry and exit points. Signals are formed based on zero line crossovers, crossovers between the VFI line and its exponential moving average (EMA), and when the indicator exits overbought and oversold zones. Attention! This stra
FREE
PZ Trade Pad MT5
PZ TRADING SLU
4.46 (24)
This simple visual expert advisor allows you to trade easily from the chart. It handles risk management for you and can perform several useful tasks with your existing trades, saving time and making risk-management for each individual trade easier.  [ Installation Guide | Update Guide | Troubleshooting | FAQ | All Products  |  Get Help ] Trade easily from the chart Trade with precise risk management, hassle free Trade pending order with drag and drop price selection Set SL and TP levels with d
FREE
Multi Currency Strength Dashboard Mini (FREE) – Currency Strength Meter for MetaTrader 5 Multi Currency Strength Dashboard Mini 是一款适用于 MetaTrader 5 的免费指标,以清晰快读的仪表板形式实时显示 8 大主要货币 (USD、EUR、GBP、JPY、CHF、CAD、AUD、NZD)的相对强弱。 目标:在几秒内识别强势和弱势货币,帮助您构建有针对性的关注列表(例如,选择强势货币对弱势货币的交易对)。 2.00 版本新功能 全新视觉刷新 – TradingTips UI(深蓝面板、霓虹边框、蓝色标题栏)。 分区方框内的彩色强度条(绿 / 金 / 红)。 8 个货币每行显示趋势箭头(上 / 下 / 中性)。 面板拖放 – 抓取标题栏即可在图表上移动。 最小化按钮 – 紧凑模式不占用图表空间。 面板位置在 MT5 重启后自动保存。 主要功能 在单个面板中分析 8 大主要货币。 自动实时更新。 适用于所有时间周期(在所选时间周期上计算)。 兼容大多数经纪商(
FREE
Most lot size calculators assume one pip is worth ten dollars. That assumption is wrong on gold, wrong on indices, wrong on JPY crosses, and wrong on every account not denominated in USD - which is to say, wrong exactly where oversizing hurts. This one asks your server instead. It reads the tick value, tick size, point size, volume step and margin requirements actually published for the symbol on your chart, so the number it gives you is the number your account will accept. How it works Attach i
FREE
Enhanced FVG Enhanced FVG is a technical indicator for MetaTrader 5 that identifies Fair Value Gaps on the chart and measures the buyer-to-seller volume ratio within each detected gap. Volume classification is performed using M1 timeframe tick volume data, applying the same methodology used in standard Volume Profile analysis. How It Works The indicator scans three consecutive candlesticks to detect Fair Value Gaps. A Bullish FVG is identified when the high of the first candle does not overlap w
FREE
AURA Backtester Forex Simulator is a state-of-the-art manual trading simulator designed to help you master price action, test new strategies, and build trading discipline without risking real money. Unlike traditional automated backtesters, AURA transforms your standard MetaTrader chart into a fully interactive simulation environment. Practice trading historical data exactly as if you were trading the live, breathing market. Whether you are a beginner trying to understand market structure or a p
FREE
Trade assistant pro v8
Ahmed Mohammed Bakr Bakr
2 (1)
FREE FREE FREE Trade Assistant MT5 – Professional Trading & Risk Management Panel Trade Assistant MT5 is an advanced trading panel designed to help traders execute orders faster, safer, and more professionally . It simplifies manual trading by combining smart order management , precise risk control , and one-click execution , making it ideal for both beginners and advanced traders. This tool does not trade automatically . Instead, it empowers you with full control while applying professional-gra
FREE
Trendline mt5 indicator
David Muriithi
4 (2)
Are you tired of drawing trendlines every time you're analyzing charts? Or perhaps you would like more consistency in your technical analysis. Then this is for you. This indicator will draw trend lines automatically when dropped on a chart. How it works Works similar to standard deviation channel found on mt4 and mt5. It has 2 parameters: 1. Starting Bar 2. Number of bars for calculation The   starting bar   is the bar which drawing of the trend lines will begin, while the   number of bars for c
FREE
SignalXpert
Steve Rosenstock
5 (4)
点击此处查看我所有免费产品 SignalXpert 是我专为使用 RangeXpert 指标的交易者开发的一款强大的分析工具。 RangeXpert 作为系统的基础,可精确识别市场区域并提供数据, SignalXpert 会对这些数据进行实时分析,从而生成清晰且可执行的交易信号。 这使得系统能够在不同周期中同时监控多达 25 个不同的资产 ,并实时捕捉最重要的市场变化。得益于集成的提醒功能, 可以通过 alert、push 或 email 发送通知 ,确保你不会再错过任何交易机会。安装在 MetaTrader VPS 上后, SignalXpert 可 24/7 全天候运行,为你提供可靠的信号监控。无论你是在规划进场还是出场, SignalXpert 都能为你提供快速而精准的支持,帮助你在波动的市场中自信交易。 规格 与 RangeXpert 无缝集成 - 使用其数据对市场区域和区间进行实时分析。 同时监控多达 25 个资产 - 非常适合多资产和多周期分析。 兼容所有主要市场 - 外汇、货币、金属、股票和指数。 实时信号检测 - 自动识别突破、区间切换和趋势区域。 实时通知 -
FREE
EA Close All Set TPSL All  Panel EA Close All Set TPSL All MT5 is a professional utility tool for MetaTrader 5 that helps traders manage orders quickly and efficiently. With a clean on-chart control panel, you can close trades or set Take Profit / Stop Loss levels for all orders with just one click.       [MT4 Version --->  click . ] Key Features On-Chart Control Panel   – Light gray background with simple and intuitive design. Close All Orders   – Instantly close all active Buy, Sell, and
FREE
Free automatic Fibonacci is an indicator that automatically plots a Fibonacci retracement based on the number of bars you select on the BarsToScan setting in the indicator. The Fibonacci is automatically updated in real time as new highest and lowest values appears amongst the selected bars. You can select which level values to be displayed in the indicator settings. You can also select the color of the levels thus enabling the trader to be able to attach the indicator several times with differe
FREE
Follow The Line MT5
Oliver Gideon Amofa Appiah
4.6 (35)
This indicator obeys the popular maxim that: "THE TREND IS YOUR FRIEND" It paints a GREEN line for BUY and also paints a RED line for SELL. (you can change the colors). It gives alarms and alerts of all kinds. IT DOES NOT REPAINT and can be used for all currency pairs and timeframes. Yes, as easy and simple as that. Even a newbie can use it to make great and reliable trades. NB: For best results, get my other premium indicators for more powerful and reliable signals. Get them here: https://www.m
FREE
Pump Liquidity Refueling
Konstantin Meshcheriakov
PUMP V3_0 Liquidity Refueling — Refueling Your BalanceWhat is "Liquidity Refueling"? Think of the Forex market as a highway and liquidity as the fuel.  When institutional players "pour" massive volume into the market, the price makes a sharp surge — an impulse or a "pump."  The PUMP V3_0 EA acts as a smart fueling station: it identifies moments of maximum market energy and "pumps" that momentum directly into your trading account.   Performance Metrics (Strategy Tester Data):Net Profit "Pumped"
FREE
SPECIAL ANNOUNCEMENT: Get the Ultimate Trading Suite! Before you grab this utility, did you know? The LogicLadder Visual Trade Planner is so powerful that it serves as the core visual execution engine for my flagship MT5 trading systems! If you are looking for a massive, all-in-one trading dashboard, advanced trade management, or strict prop-firm guardrails, you can get this exact visual planner already included inside my premium and free full-suite EAs: Pro LTS TradeDashboard MT5 (Paid
FREE
该产品的买家也购买
Native Websocket
Racheal Samson
5 (6)
An   easy to use, fast,  asynchronous   WebSocket library  for MQL5. It supports: ws://   and   wss://  (Secure "TLS" WebSocket) text   and   binary   data It handles: fragmented message  automatically (large data transfer) ping-pong   frames  automatically (keep-alive handshake) Benefits: No DLL required. No OpenSSL installation required. Up to 128 Web Socket Connections from a single program. Various Log Levels for error tracing Can be synchronized to MQL5 Virtual Hosting . Completely native t
ModernUI Library
Levi Dane Benjamin
适用于 MetaTrader 5 的 ModernUI 库 ModernUI 是一个用于 MetaTrader 5 的图表内用户界面库。它可以帮助 MQL5 开发者在 MT5 图表环境中构建更清晰的 EA 面板、仪表盘、设置窗口、表单、表格、对话框、抽屉式面板以及紧凑型交易风格界面。 它适合希望获得比零散图表对象更专业的界面层,同时仍然完全掌控自己 EA、指标或工具逻辑的开发者。 Modern UI - 用户指南   | EA 示例演示 你可以构建什么 ModernUI 并不局限于某一种面板类型。它为你提供了一个可复用的界面层,几乎可以用于任何你想在 MetaTrader 5 图表中构建的工具。 你可以用它创建简单的设置界面、紧凑型交易面板、完整仪表盘、数据视图、控制面板、账户工具、流程界面、监控界面、实用工具窗口、商业 EA 前端界面等等。 随附的演示展示了几个实用示例,但它们只是起点。如果你的 MQL5 项目需要按钮、输入框、表格、对话框、标签页、抽屉面板、图表、状态区域,或需要一种更清晰的方式在图表上展示信息,ModernUI 都可以为你提供构建模块。 主要功能 适用于 Me
This library will allow you to send your trades using your MT5 EA bot and its very easy to integrate on any EA which you can do yourself with the script code which is mentioned in documentation. This product allows trading operations via API For MEXC chart : Renting   Crypto Charting  for OHLC data or   Crypto Ticks with Order Book Depth  is optional - Supports MEXC API calls - Place Limit, SL Limit and Take Profit Limit Orders - Place Market, SL-Market, TP-Market orders - Modify Limit order - C
MT5 to Delta Exchange API Bridge EA Connector allows your expert advisor with mq5 file to integrate and communicate with Delta Exchange using API Keys You can place order, check balance and other order managements using Delta Exchange API - Place Limit, SL Limit and Take Profit Limit Orders - Place Market, SL-Market, TP-Market orders - Cancel Order - Query Orders - Change Leverage, margin - Get Position info and many more, details available at demo script Script Documentation 
EX5 Signal Copier
Rajesh Kumar Nait
EX5 信号复制库 — 适用于 MT 的专业交易事件引擎 无需编写复杂的交易跟踪逻辑,即可将任何智能交易系统 (EA) 转换为强大的交易复制器、信号处理器或自动化引擎。 EX5 信号复制库是一个高性能的事件驱动系统,能够捕获 MetaTrader 5 中的所有交易活动,并将其转换为结构化信号,您可以利用这些信号构建: 交易复制器(MT5 → MT5 / MT5 → 外部) 风险管理引擎 分析仪表盘 自定义执行桥接(币安、API 等) 为什么选择此库? 实时交易检测 结构化信号队列 事件分类(开仓、平仓、修改、部分平仓) 内置复制引擎(可选) 通过自定义逻辑实现完全控制 主要特性 实时交易捕获 使用 OnTradeTransaction 即时检测每一笔交易 备份轮询系统确保不遗漏任何信号 完整的交易生命周期支持 捕获所有操作: 买入/卖出 限价/止损单 止损/止盈修改 部分平仓 持仓平仓 反向交易 成交量增加 信号队列系统 线程安全的内部队列 按顺序处理信号 即使在高负载下也不会遗漏任何事件 内置复制引擎
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions. Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lot (1,3,5,8,13) you can use it in different way calculate when loss=1 ,when profit=0. Mode 2: Multiplier Lot (1,2,4,8,16) you can use it in different way calculate when loss=1 ,when profit=0. Mode 3: Plus Lot (1,2,3,4,5) you can use it in different way calculate when loss=1 ,when profit=0. Mode 4: SL/Risk Lot calculate based on s
Friends, join us! Ask questions and connect with like-minded traders: MetaCOT Public Group MetaCOT Information Channel: news, CFTC reports, and signals: MetaCOT Channel Here’s to successful trading and new profitable signals for us all! Attention! Recently, certain countries have been blocking access to the cftc.gov website. As a result, users in these countries are giving the product low ratings. MetaCOT has always adhered to the highest quality standards and is in no way associated with th
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.
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 "MQL5\Files" directory. Then it uses these files to automatically build a cluster walk forward report and rolling walk forward reports that refine it (all of them in one HTML file). Using the WalkForwardBuilder MT5 auxiliary script allows building othe
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
BitMEX Trading API
Romeu Bertho
5 (1)
Cryptocurrency analysis has never been easier with Crypto Charts for MetaTrader 5. Now, trading on BitMEX has never been easier with BitMEX Trading API for MetaTrader 5. BitMEX Trading API library was built to be as easy to use as possible. Just include the library into your Expert Advisor or Script, call the corresponding methods and start trading! Features Trade on BitMEX and BitMEX Testnet. Build and automate your strategies. Concern more with the trading strategy logic and less with the co
Teclado trader, é uma BIBLIOTECA que você pode chamar no OnChartEvent para abrir posição de compra/venda/zerar, os botões padrões são: V = venda C = compra Z = zerar posições a mercado S = zerar posições opostas e depois a mercado X = zerar posições opostas Além da função de teclado, é possível mostrar os estados do ExpertAdvisor usando o MagicId, com informação de: lucro mensal, semanal, diario, e posição aberta, para isto use o OnTick, ou qualquer outro evento (OnTimer / OnTrade / OnBookEven
Goliath Mt5
Nicolokondwani Biscaldi
Goliath MT5 - scalper fully automated Expert Advisor for medium-volatile forex markets P roperties: The Library trades 10 currency pairs (USDCHF, EURCHF, EURGBP, AUDUSD, USDCAD, GBPUSD, EURUSD, NZDUSD, CADCHF, EURAUD, EURCAD, AUDJPY) The Library does not use martingale The Library sets a fixed stop loss and take profit for all orders The Library only trades a user input volume The Library can be installed on any currency pair and any timeframe Recommendations: Before using on a real account, t
Binance Library
Hadil Mutaqin SE
5 (1)
The library is used to develop automatic trading on Binance Spot Market from MT5 platform. Support all order types: Limit, Market, StopLimit and StopMarket Support Testnet mode Automatically display the chart on the screen Usage: 1. Open MQL5 demo account 2. Download Header   file and EA sample   https://drive.google.com/uc?export=download&id=1kjUX7Hyy02EiwTLgVi8qdaCNvNzazjln Copy Binance.mqh to folder \MQL5\Include Copy  BinanceEA-Sample.mq5 to folder \MQL5\Experts 3. Allow WebRequest from MT5
Gold plucking machine   Gold plucking machine   is an Expert Advisor designed specifically for trading gold. The operation is based on opening orders using the Fast and Slow lines indicator, thus the EA works according to the "Trend Follow" strategy, which means following the trend. Use grid strategy to place orders without stop loss operation, so please make sure the account has sufficient funds. magic number        -  is a special number that the EA assigns to its orders. Lot Multiplier     
The library is used to develop automatic trading on Binance Futures Market from MT5 platform. Support Binance Futures USD-M and COIN-M Support Testnet mode Support all order types: Limit, Market, StopLimit, StopMarket, StopLoss and TakeProfit Automatically display the chart on the screen Usage: 1. Open MQL5 demo account 2. Download Header file and EA sample https://drive.google.com/uc?export=download&id=17fWrZFeMZoSvH9-2iv4WDJhcyxG2eW17 Copy BinanceFutures.mqh to folder \MQL5\Include Copy  Bina
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 5.ex5"       //祝有个美好开始,运行首行加入    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 );    //复杂开单
Binance Library MetaTrader 5 connects your Expert Advisors, indicators, and scripts to Binance.com and Binance.US directly from MetaTrader 5. It is a developer library for building custom Binance integrations inside MT5, not a standalone trading robot or copier. The library helps you add Binance instruments to Market Watch, read symbol specifications, load current and historical market data, check wallet balances, manage orders, and track open positions. It supports Spot, USD-M futures, and COI
1. 这是什么 MT5系统自带的优化结果非常少,有时候我们需要研究更多的结果,这个库可以让你在回测优化时可以输出更多的结果。也支持在单次回测时打印更多的策略结果。 2. 产品特色 优化的输出的结果非常多。 可以自定义CustomMax。 输出结果在Common文件夹。 根据EA名称自动命名,且同一个EA多次回测会自动更新名称,不会覆盖上一次的结果。 函数非常简单,你一眼就可以看懂。 #import "More BackTest Results.ex5" // Libraries Folder, Download from the market. //---Set CustomMax void iSetCustomMax( string mode); //---Display multiple strategy results when backtesting alone (not opt). void iOnDeinit(); //--- void iOnTesterInit(); double iOnTester(); void iOnTesterPass( string lang
T5L Library is necessary to use the EAs from TSU Investimentos, IAtrader and others. It contains all the functions framework needed to Expert Advisors working properly.  ツ - The Expert Advisors from  TSU Investimentos does not work without this library,  the T5L library can have updates during the year - At this Library you will find several funcionalities like order sends, buy and sell, trigger entry points check, candlestick analyses, supply and demmand marking and lines, and much more. 
AO Core
Andrey Dik
3.67 (3)
AO Core is the core of the optimization algorithm, it is a library built on the author's HMA (hybrid metaheuristic algorithm) algorithm. Pay attention to the MT5 Optimization Booster product , which makes it very easy to manage the regular MT5 optimizer . An example of using AO Core is described in the article: https://www.mql5.com/ru/articles/14183 https://www.mql5.com/en/blogs/post/756510 This hybrid algorithm is based on a genetic algorithm and contains the best qualities and properties of p
EA Toolkit
Esteban Thevenon
EA Toolkit   is a library that allows any developer to quickly and easily program Advisor experts. It includes many functions and enumerations such as trailing stop, lot, stop loss management, market trading authorisations, price table updates, trading conditions and many more. Installation + Documentation : You will find all the information to install this library and the documentation of its functions on this GitHub : https://github.com/Venon282/Expert-Advisor-Toolkit WARNING : The installat
GetFFEvents MT5 I tester capability
Hans Alexander Nolawon Djurberg
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 MT5 tab > Tools > Options > Expert Advisors > Check Allow web request for listed URL. Since the WebRequest() function can't be called from indicator ba
A Simple Moving Average (SMA) is a statistical indicator used in time series analysis. This indicator represents the arithmetic mean of a sequence of values over a specific period of time. SMA is used to smooth short-term fluctuations in data, helping to highlight the overall trend or direction of changes. This aids analysts and traders in better understanding the general dynamics of the time series and identifying potential trends or changes in direction.  More information you can find in Wiki 
该库将允许您使用任何 EA 来管理交易,并且非常容易集成到任何 EA 上,您可以使用描述中提到的脚本代码以及显示完整过程的视频演示示例自行完成。 - 下限价、止损限价和止盈限价订单 - 下达市场订单、SL 市场订单、TP 市场订单 - 修改限价订单 - 取消订单 - 查询订单 - 更改杠杆、保证金 - 获取位置信息 和更多... 租赁加密货币图表是可选的,除非您的 MT5 上没有币安图表。 对于脚本演示:单击此处 如果您想与交易面板进行交易,您可能对此产品感兴趣 该产品是加密图表的插件 该库将允许您使用任何 EA 来管理交易,并且非常容易集成到任何 EA 上,您可以使用描述中提到的脚本代码以及显示完整过程的视频演示示例自行完成。 - 下限价、止损限价和止盈限价订单 - 下达市场订单、SL 市场订单、TP 市场订单 - 修改限价订单 - 取消订单 - 查询订单 - 更改杠杆、保证金 - 获取位置信息 和更多... 租赁加密货币图表是可选的,除非您的 MT5 上没有币安图表。 对于脚本演示: 单击此处 如果您想与交易面板进行交易, 您可能对
Hello everyone! I am a professional MQL programmer , Making EAs, Indicators and Trading Tools for my clients all over the world. I build 3-7 programs every week but I seldomly sell any ready-made Robots. Because I am fastidious and good strategy is so few...  this EA is the only one so far I think its good enough to be published here.  As we all know, the Ichimoku indicator has become world popular for decades, but still, only few people knows the right way of using it, and if we check the clo
Applying these methods, I managed to arrive at a nuanced conclusion that is crucial to understanding the importance of unique strategies in contemporary trading. Although the neural network advisor showed impressive efficiency in the initial stages, it proved to be highly unstable in the long run. Various factors such as market fluctuations, trend changes, external events, etc. cause its operation to be chaotic and eventually lead to instability. With these experiences, I accepted the challenge
Introducing "TG Risk Service Manager" — your comprehensive toolkit for swift and precise risk management and lot size calculations in the dynamic world of trading. Designed to streamline development processes and enhance trading strategies, this indispensable library equips developers with essential tools for optimizing risk assessment and trade profitability. Metatrader4 Version |  All Products  |  Contact   Key Features: Efficient Lot Size Calculation : Harness the power of precise lot size c
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. Metatrader4 Version   |   All Products   |   Contact   Key Features: Unified Interface : TG Trade Service Manager" provides a unified interface for   MQL4   an
OpenAI Library MT5
VitalDefender Inc.
该库旨在提供一种尽可能简单的方法,直接在MetaTrader上使用OpenAI的API。 要深入了解库的潜力,请阅读以下文章: https://www.mql5.com/en/blogs/post/756098 The files needed to use the library can be found here: Manual 重要提示:要使用EA,需要添加以下URL以允许访问OpenAI API  如附图所示 要使用该库,需要包含以下Header,您可以在以下链接找到:  https://www.mql5.com/en/blogs/post/756108 #import "StormWaveOpenAI.ex5" COpenAI *iOpenAI(string); CMessages *iMessages(void); CTools *iTools(void); #import 这就是您需要的所有信息,以便轻松使用该库。 以下是如何轻松使用该库并与OpenAI的API交互的示例 #include <StormWaveOpenAI.mqh>       //--- 包含用于AP
作者的更多信息
默认扫描最近 300 根K线,为每个由三根K线构成的公允价值缺口画出方框,绘制其 50% 水平线,并标出价格首次回到近端边缘的位置。 功能 看涨与看跌的公允价值缺口,各自在第三根K线收盘后形成。 50% 的 Consequent Encroachment(CE)线,点线样式,在 InpShowCE 打开时显示。 触及时:裁剪到触及的那根K线、删除、变暗或保留;未被触及的缺口延伸 InpExtendBars 根K线。 该次触及的可选提醒,每个缺口一次。 参数 InpLookbackBars 300; InpMinGapPoints 0.0; InpMitigationMode MITIGATION_TRIM; InpShowCE true; InpExtendBars 20. InpBullishEnabled true; InpBullBorderColor clrMediumSeaGreen; InpBullFillColor C'220,245,230'; InpBullCEColor clrSeaGreen. InpBearishEnabled true; InpBearBord
FREE
Draws the four main trading session ranges on the chart in GMT, counts the pip range of each as it forms, and marks its high and low. FEATURES Four ranges: Asian, London Open, New York Open, London Close. Automatic GMT offset detection, with manual override. Session high and low levels, with a live pip range. HOW TO USE IT 1. Attach it to a chart. Default lookback is five days. 2. Check the detected GMT offset and correct it. 3. Enable or disable each session and set its hours. PARAMETERS InpDay
FREE
Swap Cost Per Position
Jevon Naldo Yoshield
Swap Cost Per Position 把你今晚隔夜结算的持仓放进一张表,以金额显示。 我为持仓过夜的交易者写了它:把即将发生的费用与已记录的隔夜利息并排看清,并且在隔夜利息以点数报价时,看到正的隔夜利息要用多少个夜数才收回往返成本。 显示内容 每个持仓一行,按今晚定价:费用使用该持仓自己的交易量,超出你设置的行数上限的持仓,在最后一行计数。 两个数字,两个来源:累计隔夜利息列是终端自己的数字;今晚这一列由品种计算得出。 三倍日来自你的品种:表头打印图表品种的三倍日与所用系数,每一行都带上它实际应用的系数。 正的隔夜利息,以夜数计算:当隔夜利息以点数报价且利息为正时,回本夜数会显示收回往返成本所需的正常夜数,按今天的点差和你输入的佣金计算。 用横线,绝不用零:算不出的数字显示横线,原因只打印一次。隔夜利息不以点数报价时,回本夜数单元格打印原因而不是数字。 设定系数与佣金:三倍系数和往返佣金都是输入参数,所以今晚的费用和回本夜数跟随你的设置。 入场前先有答案:两行预览按你设置的交易量,为图表品种的多头和空头报价,让你在持有任何仓位之前就能读到这份费用表。 按报价货币显示:在你的存款
FREE
Order Entry Panel
Jevon Naldo Yoshield
Order Entry Panel 是一个交易面板,在图表上单击一次即可发送市价单,止损已随单附加。 我为手工执行、希望把决策放在图表上的交易者写了它。 功能 发送前先看清订单:每个请求行都会显示价格、交易量、止损和可能设置的目标。 每次入场都带止损,按你设置的距离计算,并在发送前附加。 点击前先看保证金:终端为该请求行算出的数值,或不足的差额。 一次点击发送一笔市价单:该请求仍在途中时再次点击会被拒绝,不会重试。 在对冲账户上查看经纪商的限制:止损水平和冻结水平,以及止损落在止损水平之内时允许的价格。 在对冲账户上管理交易:锁定盈亏平衡、部分平仓,或平掉面板在该品种上开出的全部持仓。 回查已发送的内容:请求、服务器的应答、订单号和成交号都会写入终端 Files 文件夹中的 CSV 日志。 使用方法 1. 把它挂到一张图表上,设置交易量、止损距离和目标。 2. 查看两条请求行和保证金。每一行就是其按钮发送的内容。 3. 点击 BUY 或 SELL。订单按该行显示的交易量、价格、止损和可能设置的目标发出。 参数 交易:你输入的交易量;以点为单位的止损与目标距离(默认 200 和 400,
FREE
柱回放会遮住你还没走到的柱。这个回放还会按入场所在柱记录的点差为每一笔虚拟入场定价,并以 R 为这次尝试计分,让手工演练的交易者看清这个决策值多少。 功能 会话中不会提前看到未来的柱:遮罩挡住回放还没走到的柱。 柱的点差:每笔虚拟成交都付该柱上记录的点差,绝不用你输入的点差;没有记录点差的柱会以 NO FILL - BAR SPREAD 0 拒绝市价单或平仓,而一笔穿过它的交易仍然开着。 不发送订单:每一笔订单都是虚拟的,它不读取持仓,也不打开文件,所以它无法对你的账户做任何操作,无法说出真实交易做了什么,也不会留下交易记录。 只用一个 R 计分:以你设置的止损距离为倍数,它打印的任何数字都不是金额,因为它不读取账户属性,包括存款货币。 没有止损的交易也算数:它被计入但不计分,面板会标出它,而不是编造一个 R。 算术看得见:每笔成交都用该柱记录的四个价格,开盘、最高、最低和收盘,而不是逐笔数据,也不读取实时报价。越过订单的缺口按该柱的开盘价成交:止损遇到跳空,就在比触发价更差的一侧成交;限价单在更好的一侧。 每次都以同样的方式结算:一根柱同时包含止损和目标时,按止损算,除非该柱的开盘已
FREE
Drag the stop loss line to your level and the panel works out the lot size for the risk you set, from your broker's own contract size. FEATURES Entry, stop loss and take profit lines you drag. Lot size normalised to the broker's minimum, maximum and step. Risk as a percentage of balance or equity, fixed cash, or fixed lot. Live risk to reward ratio. HOW TO USE IT 1. Attach it to a chart and drag the three lines. 2. Set the risk basis and value in the inputs. 3. Read the lot size from the panel.
FREE
Closes your positions and deletes your pending orders when the day's equity drawdown reaches your limit, and closes anything you open for the rest of that day. FEATURES On breach: closes every open position, deletes pending orders, locks the day. Panel: drawdown percentage, equity, state. HOW TO USE IT 1. Enable Allow Algo Trading. 2. Attach it to a chart and set the loss and warning levels. 3. Choose the breach actions. PARAMETERS InpDailyMaxLossPercent, InpDailyWarningPercent, InpAutoCloseOnBr
FREE
Shows the live spread, today's range against the daily ATR, the server time, GMT offset, the countdown and the open sessions. FEATURES Live spread in points and pips, colour coded tight, moderate or wide. Optional push alert. Today's range in pips, the daily ATR share, the server time, GMT offset, the countdown and the sessions. HOW TO USE IT 1. Attach it to any chart. 2. Set the spread limits for the symbol. 3. Choose the ATR period and corner. PARAMETERS InpCorner, InpOffsetX, InpOffsetY, InpS
FREE
Shows what each closed trade earned after commission, swap and fees, by symbol, session, hour, weekday or month. FEATURES Rebuilds each trade from its deals, costs apart from gross. Net result, R, summary, breakdowns, cost alarm, CSV export. HOW TO USE IT 1. Attach it to a chart. 2. Choose the window and table. 3. Read the panel or export the CSV. PARAMETERS InpRange, InpFilterMagic, InpRiskPercent, InpFixedStopPips, InpBreakdown. LIMITATIONS Trades opened before the window are counted, not reco
FREE
筛选:
无评论
回复评论