MQL5 Algo Trading community — forex forum for traders and developers

Algo-trading is tough. If you’ve been at it since the early 2000s like some of us, you know what I mean. We all came for the same thing: the “money-making bomb” -- one system -- switch it on -- forget the day job. Then we spent years trying to crack the price. One by one, had to admit there is no
On Friday, September 25, 2026, an updated version of the MetaTrader 5 platform will be released. We have significantly expanded the capabilities of the AI Assistant for interacting with the platform. New tools have been added for working with Expert Advisors, scripts, and indicators, preparing
Hello MetaQuotes team, Could the team responsible for MetaQuotes-Demo market history confirm the authoritative conversion from native MT5 timestamps to actual UTC for 2021–2026? We need reproducible historical/live alignment while retaining MetaQuotes as our data source. Please distinguish a
How many of you have lost a prop firm challenge because of the loss limits (daily or maximum), and not because of the strategy? And what would have helped you the most to pass? A clearer rule from the firm, an alert before reaching the limit, a fixed daily routine, smaller position sizes, or
Hello, I'm wondering about this question. By what principle do news from groups and channels get into the “new” section
Hello, I am looking for an official MetaEditor distribution for MetaTrader 4 to compile and investigate my own MQL4 program in an isolated Windows environment. I would appreciate clarification on the following questions: Is there an official, fully offline MT4 installation package that includes
I traded this EA and backtested it normally. Why is this error appearing when I upload it to the store? Please advise me
Dear MetaQuotes Support Team, I am reaching out regarding a persistent limitation encountered when running multiple concurrent terminal instances on the same machine, and to request technical clarification or a potential update in upcoming builds. Setup & Environment: Hardware Capacity: The machine
Hiya friends, I have a problem with a CQueue that I want to use to store class objects. In one function, I put in class instances into the queue and in another function I want to take them out again. Locally inside the function in which I put them in I can dequeue without any problems, but globally
MetaQuotes has launched new MQL5.community information channels on Facebook, X.com (Twitter), and Telegram. These channels provide daily publications of relevant technical materials from the MQL5.com Articles and CodeBase sections. They are designed to promptly update developers on algorithmic
Is it worth it anymore to sell EA's and Indicators in this AI age, Yes, No
Hello, I would like to ask whether MetaQuotes has any plans to support MathML elements when creating new articles on the MQL5. Currently, the article editor allows us to write content in both Visual and HTML modes, and MathML formulas can be correctly rendered when switching from the HTML to the
We are preparing MetaTrader 5 module for Python. As with the R package , we are testing on simple functions to extract data from a running copy of the terminal. How you can test how it works: Install Python 3.7.6 x64 from https://www.python.org/downloads/windows/ with the %PATH% path included , Get
Hello MetaQuotes team, I am developing a Python market-data pipeline and need clarification about the timestamp behavior of the official MetaTrader 5 Python API. Environment MT5 terminal: build 6231 Python MetaTrader5 package: 5.0.6231 Broker: FundedNext-Server 2 Symbol: XAUUSD Timeframe: M15
Hello, I am using MetaTrader 5 build 6266 on Windows with a demo account. Under Tools → Options → Expert Advisors , I have the following settings: Allow algorithmic trading: Disabled (unchecked). Allow DLL imports: Disabled (unchecked). Disable algorithmic trading via external Python API: Greyed
Hello traders, I have been working on algorithmic strategies for XAUUSD (M15 timeframe), and one of the biggest challenges I face is controlling drawdown while maintaining solid profitability. In your experience: - What risk management techniques work best for gold? - Do you prefer fixed lot or
I was testing a daily loss lock in the Strategy Tester (100,000 account, 5% daily limit = 5,000, lock set at 90% of the limit). With "1 minute OHLC" the lock fired late: the day closed at 105% of the limit. With "Every tick based on real ticks" it locked at 90.0% (−4,501), exactly as designed. The
We run a small MT5 stack with a 1 % daily loss cap. It had been in place for months and we trusted it. Replaying our own history, a day where every stop gaps at its instrument’s 99th percentile reaches 13.84 % of equity . Not 1 %. The cause is simple once you see it: the limit counts the stop, not
I run an LLM-driven intraday scalper on MT5 (demo). Over 60 closed trades it lost $212, and commission alone was 40% of that loss. Before asking "how do I make it profitable", I spent two weeks trying to establish whether it has any directional edge at all. It does not — and I want a sanity check
How do you measure the real impact of economic news on an EA? I've been researching how automated trading systems behave around economic releases, and I've noticed that simply classifying events as Low, Medium or High impact doesn't tell the whole story. Two High-impact events can produce completely
I've been thinking about market regimes lately and I'm starting to question how we normally build EAs. Most strategies are basically built around the assumption that the market behaviour we see in the backtest will continue to exist in the future. But we all know that isn't always the case. A trend
Over the years, I’ve tested and observed many Expert Advisors, especially on XAUUSD. And there’s something that keeps repeating itself again and again. Most EAs that show amazing backtests on gold rely on some form of martingale or grid logic. At first glance, everything looks perfect: high win
Hello everyone, I wanted to share some lessons learned about parameter optimization, hoping to get your feedback and maybe some ideas to improve. 1. Walk- forward optimization beats simple single-period optimization. A strategy that looks great on one year of history often breaks on the next six
  VPS server  (82   1 2 3 4 5 ... 8 9)
What kind of vps do you use? Maybe some cheap and reliable advice for 5-10 terminals
  MetaEditor, Open AI and ChatGPT  (120   1 2 3 4 5 ... 11 12)
Forum on trading, automated trading systems and testing trading strategies Test version of MQL5 Copilot in beta 3647 Renat Fatkhullin , 2023.03.23 23:11 In today's beta version 3647, we've included the first version of Copilot, a feature to enhance the editor's ability to write code. The settings
Good day dear forum members. After reading the forum a bit, I came across several threads on arbitrage and pair trading . Judging by the threads, some are interested and some are trying it. I used to dabble in this topic a long time ago, but my knowledge was not enough. Now I am a complete mess in
  Money Management  (232   1 2 3 4 5 ... 23 24)
Hi Here is the code I use for my money management. - Actually it shouldn't be called MM, as it is only calculates how many lots can I buy so that when I hit my stop loss I only loss a certain percentage of my account. I think though that is one of the crucial aspects of forex- trading - as it leads...
HI,Which strategy is best for BTCUSD
I want to say that my nick 'newdigital' is not connected with digital filters. But I started this thread to discuss and explain about trading strategies based on the digital filters only. And to understand how to implement those filters. All about digital filters you may find
What is your Preffered Syle of trading? Swing Day Or Scalping? What EA would you prefer for developers to make you assuming All of the work and are profitable
  Simple trade automation?  (19   1 2)
I used to use metatrader4 when I was messing with Forex, but I have funds that I'd like to use out of my stock porfolio to trade one particuarl stock which goes up and down $1-2/day pretty much all the time. I'd like to set metatrader up to say, sell at a certain price, then buy at $2.00 lower, then
Hello, Can any one please suggest me the best indicator for binary options trading? Thanks...
Hi, Can someone please let me know how to use Metatrader5 to trade in stocks in NSE and/or BSE stock markets in India? Thanks, Amitabh
Dear all, I am trying to import historical data (M1) to MT5 from my Tradestation account. I have export the data in csv format and below there are some rows as example: "Date","Time","Open","High","Low","Close","TotalVolume" 1/2/2008,03:01:00,3841.00,3842.25,3840.25,3841.75,184
  Welcome to the new section!  (15   1 2)
Inspired by comments and reviews received from MQL5.community members, we have added a new forum section called "Trading stocks, futures, options and other exchange instruments". Share your ideas and trading experience with the website visitors. Reach out to MetaTrader 5 developers if you have...
  Nasdaq  (6)
Does anyone here trade Nasdaq? What leverage do you get from your broker
  BTC  (12   1 2)
Does anyone here trade BTC
Hi All How do I add the NSE Indian Market- Stocks and Futures into the MT5 market watch. Thanks a ton for your help. Regards Praveen
  MT5 and NSE  (5)
what is the procedure to add symbol from NSE to MT5 marketwatch and start trading NSE option trading and back test
  Who are the resistance?  (19   1 2)
If BTC/USD has support at $68,000 and resistance at $70,000, what type of group or person would keep dumping at $70,000 when they make very little profit from a buy at $69,000
For the past weeks I've been developing an EA based on SMC, multitimeframe liqquidity-sweep: Stats are good IMO, DD < 10%, good sharpe ratio, etc... But I question myself about this being more stable? Such as diversifying. My main problem is choosing a variety of pairs, i.e: EUR/USD GPB/USD USD/JPY
I want to demo Options board on MT5 but cant find ANY one who offers it? Where can i try the MT5 options board? Who is currently demo/ real trading with MT5 options platform? its ridiculous i cant find ANY information on how to actually do it/ who offers it. Its almost as if it doesnt exist/ noone
  Indexes disabled  (6)
SP500 and NASDAQ Indexes are not up to date and have been disabled for some time now. Is anyone else experiencing this
Hi @ all, i´m new with MT 5 and wanted to know if its possible to trade on sim/demo account other markets than forex? For instance, NQ, SP500, etc. For now i only see forex markets to choose from. Any ideas? Thanks
MQL5 Cloud Network: inconsistent OnTick stream under real-tick modeling Technical reproduction report | 14 October 2026 | MetaTrader 5 Strategy Tester Issue summary A non-trading diagnostic Expert Advisor (TickParityDiagnostic_V4.mq5) produces materially different OnTick event sequences in
  What is considered an edge?  (36   1 2 3 4)
I have discussed a couple of times in threads about EAs and if they have any real edge or not. But what is really considered an edge? Is it a combination of indicators that on historical prices of a specific market can predict the direction of price most of the time? Will it suffice to have a
I wanted to know whether one of the new pre-trained time-series models can run inside MetaTrader 5 itself, without Python, DLLs or WebRequest, so that it also works in the Strategy Tester. It can. These are my notes on IBM's Granite TTM-R2 (Tiny Time Mixers, Apache-2.0), with the numbers I measured
Any EA that works with fixed session times (Tokyo fixing, London open, New York close) needs the broker's GMT offset, the difference between server time and UTC. Live, TimeTradeServer() - TimeGMT() gives it. In the Strategy Tester it does not: the documentation says that during testing TimeGMT() is
Running 2 EAs on MT5 via VPS. Recently had one go quiet for about 3 days — no crash, no errors in Experts or Journal, smiley face still there, terminal connected. It just stopped taking trades. I only found out because I manually check the accounts every few days. Could easily have been longer
After a lot of bought EAs, prop challenges and backtests that looked great, I ended up with a short checklist I now go through before I pay for anything. Backtests weren't the problem. They just never told the whole story. Here's my list. Curious what you'd add or disagree with. 1. Deposits dressed
We are preparing an MT5 Expert Advisor whose genuine trading strategy is designed exclusively for metadata-verified XAU/USD, using internal M15 data. We do not intend to trade unrelated FX instruments, generate artificial validation trades, or alter risk controls specifically for the Strategy
Hi, i'm intended to create an EA with AI Assistant (MQL5 model), but before there are somethings i wanna know first: Can I build complex EAs with MQL5 Lite, or does its capability depend on the prompts I give it? Can I continue working on my prompt in the same chat room on another day once I've
Hi all, In early October 2026, I went through the product pages and public signal track records of ten of the best-selling scalping and martingale-type EAs on the MQL5 Market, and checked every figure twice. I'm not naming any sellers — patterns matter more than people. Here is what kept repeating
Hello MetaQuotes Support, We need to determine whether an MQL5 Expert Advisor can enforce a strict 14,400-second wall-clock deadline when an in-progress file operation does not return. Could you please clarify: Are FileOpen, FileWriteString, FileFlush, FileClose, FileMove, FileCopy, FileReadArray
If an EA needs Japanese bank holidays, for example to trade the Tokyo fixing on gotobi days or to stay out of thin Tokyo mornings, there is no need for a calendar file or WebRequest: the holidays follow fixed rules and can be computed. This is the code I use. It covers the equinox days for
Hello everyone, I would like to ask for advice from developers who have experience publishing Expert Advisors on the MQL5 Market, especially EAs designed for a specific symbol and using external data/APIs. I have developed an Expert Advisor specifically for XAUUSD (Gold) . The EA is not a
I have successfully installed and used the MetaTrader5 package on Ubuntu without any difference on Windows. Here are the instructions. 1. Install Wine with the following command (skip if you already installed) sudo apt install wine 2. Install the MetaTrader 5 platform for Linux according to the
Let's look at the results of the tests on one and a few characters. The tests will be conducted in All ticks mode. You can use your own multisymbol EA schemes to reproduce the problem and share your results. Let us denote the problem. For example, if you test one symbol, the test time takes 1
  MACD indicator  (1535   1 2 3 4 5 ... 153 154)
We are continuing discussion about the indicators. We have the following thread: https://www.mql5.com/en/forum/175886 https://www.mql5.com/en/forum/177239 https://www.mql5.com/en/forum/177358 https://www.forex-tsd.com/forum/debates-discussions/9785-rsi-indicator https://www.mql5.com/en/forum https...
Good day, This is a public technical question. It is not a private support ticket. A response is not guaranteed. A response from other participants remains to be seen. supporting us until authorship is officially assigned to MetaQuotes and The statement binds the built-in iMA to exactly this build
Hi everyone, I am looking in vain for the code of this MESA projective indicator to be placed on the price that draws in the future the length of the cycle; Has anybody worked on that or know where to find it? I am looking for this indicator able to: take advantage of the adaptative cycles from J
Why the version of MT5 backtest speed such slow, I pend it over night(~8 Hours), only 1 pass finished but I have brought a new cpu, the usage of CPU keep only 11%
Hi, I read that using ArrayCopy on the same array could cause data corruption when the initial source index is lower than the target index, due to the left-to-right copy. I tried, but no data corruption was detected. Can I be sure this won't happen under any circumstances? Here a simple script
Hello Friends! I tried to convert an indicator from MQL4 to MQL5. the indicator named: Swing Cloud and I don't know what is wrong with MQL5 code. In uptrend the cloud should be below the price and in downtrend the cloud should be above the price. Here is on MT4 it print the cloud in the correct
I have an indicator that combines the drawing of colored arrows and colored lines. The logic for determining colors and the colors themselves are exactly the same for both arrows and lines. Does each colored plot need to have its own color buffer? Or is it possible to use one color buffer for all
Is it possible to work with txt, csv or other files in the testing strategy? If so, how
My breakout EA work on different currency pairs need an indicator to help to avoid false breakout. May be consider the volume or anything else is OK. Please advise. Thanks Peter
Hi! I'ld like to be able to draw some rectangles that are gonna mark support and resistances zones that may take lots of bars to be crossed, thus being relevant for a lot of time. In my tool, I do that by extending the final points of the rectangle to a whole new year in the future: The problem is
  Trend indicators  (515   1 2 3 4 5 ... 51 52)
All the indicators which are helping the detection the trend please post here. The first indicator is sinTrend. The value of about zero is the float, the trend is started if the value of indicator is equal or above 0.0015 or minus 0.0015, the value of above 0 is uptrend, below 0 - downtrend
  Oscillators  (48   1 2 3 4 5)
Does anyone have a large collection of oscillators (works best in a trading range) that he/she put together? Maybe we could start a thread where all oscillators are gathered. And let's go a little beyound RSI and Stochastic
  Fibo & Gann variations  (362   1 2 3 4 5 ... 36 37)
Fibo Levels indicator. Fully forecasting.
I've run accross this FFT cycle indicator in the past couple of weeks. It is very interesting to say the least. I would like to know if anybody else has any experience with this type of cycle analysis. I've know of Hurst, Clyde Lee, and Brian Millard. Brian Millards' work is among the best I've...
Hi All, Do you have an indicator in mind that you think would make your life easier or more productive, what would it be? I might be able to write it for you. Let me know it's details and if it's needed for mt4 or mt5 and if I can write it, I will give it to you for free
Magic Number Scorecard - win rate, profit factor and drawdown per EA : Running several EAs on one account? This script groups the closed trades by magic number and shows the score of each EA: win rate, profit factor, net profit and drawdown. Read-only, writes a CSV file. Author: Muhammad Muqeem
Calendar News Filter - pause any EA around high-impact news : A small include file that tells your Expert Advisor when it is inside a news window, using the economic calendar built into MetaTrader 5. No web requests and no DLL. Author: Muhammad Muqeem Korejo
Check out the new article: Machine Learning Under Constraint (Part 3): De-Risking Near the Profit Target and the News-Window Rule . Position sizing that ignores proximity to a profit target or the timing of high-impact news exposes banked progress to reversal risk and misstates simulated profit near
Compression Breakout Channels with Buy and Sell Volume : Finds volatility compressions as they form, boxes each one as a channel with ATR edge bands and marks the bar that breaks out of it. Inside the live channels: buy and sell volume split from M1 bars, drawn as candles and text, plus a gauge of
Multi-TF Data Grabber Lite — Free Clean CSV Export (M1/M15/H1 + Indicators) : Free script exporting clean, deterministic OHLC + tick volume + 4 indicators (MA, RSI, MACD, ATR) for M1/M15/H1 to CSV. Closed bars only, zero lookahead — ideal for analysis and ML datasets. Author: Abdelhakim Kouachi
Check out the new article: Beyond the Mean and Standard Deviation: A Robust Statistics Library for MQL5 Indicators . Price outliers distort indicators based on the mean and standard deviation. This article delivers a robust MQL5 library (RobustStats.mqh) implementing the median, 1.4826-scaled MAD
Check out the new article: Nonlinear OHLC Features Derived from Elliptic Curves . The article discusses the projection of EURUSD daily candlesticks onto the secp256k1 elliptic curve and the extraction of 96 features (EC+TA) to predict the direction of the next candlestick in CatBoost. The price
Check out the new article: Try/Catch style in MQL5: Bringing Modern Error Management to Algorithmic Trading . This article presents an exception-like model for MQL5 that prevents VM faults through defensive guards and cooperative TRY/CATCH/FINALLY macros. It introduces structured error objects
Basket Break-Even Lines - buy, sell and net break-even with target price : Several buys and sells open on one symbol? The indicator draws where all buys, all sells and the whole basket break even, and the price for a profit target. Planned entries can be added to see the break-even before you trade
Check out the new article: Agent Based Market Simulation: Growing a Market From Rules, and Using It to Catch an Overfitted Strategy . A compact MetaTrader 5 library builds a synthetic market from agents: a minority game, a zero‑intelligence double auction, a stylized‑facts analyzer, and a parameter
Telegram Trade Notifier - opens, closes, pending orders and daily summary : Sends every opened and closed position, pending orders and a daily account summary to your Telegram chat. It never trades on your account. Author: Muhammad Muqeem Korejo
Equity Guard - daily loss, max drawdown and profit target lock : Closes all trades and keeps the account flat when the daily loss limit, the maximum drawdown or a daily profit target is reached. Prop-firm style rules, an on-chart panel, and a state that survives terminal restarts. Author: Muhammad
Smart Money Concept Expert Advisor - Market Strucutre, FVG, Pullback : This Expert Advisor trades fair value gaps in the direction of market structure, the way Smart Money Concepts describes it. It is the third step of a series that has been built one piece at a time: In previous shared codes, the
Check out the new article: Adaptive Trade Management in MQL5: Building a Broker-Aware, Deterministic, and Explainable Exit Engine . This article presents an MQL5 trade-management engine that converts exit rules into proposal generators. A policy engine ranks all proposals by a configurable reason
Check out the new article: The MQL5 Standard Library Explorer (Part 17): Building a Reusable Portfolio Manager with CArrayObj . We present a multi‑symbol EA structure that moves symbol‑specific state into independently initialized CStrategyNode objects and manages them with CPortfolioManager. Using
On Friday, October 2, 2026, an update to MetaTrader 4 will be released. The new version includes several important security enhancements, bug fixes, and changes designed to improve the platform's overall stability. Improved management of Stop Loss and Take Profit levels for positions on the same
Hello, I am preparing my first MetaTrader 4 Expert Advisor for the Market (draft product ID 201415) and the automatic validation fails. I would like to understand how the validator tests MT4 Expert Advisors. Version 1.30: the report shows 22 errors on NZDUSD,H1: "not enough money for buy 0.20
Hello, Do you listen any music while you trade? I have tried with many different kinds, but I think classical music is the most appropriate to remain discipline focus and calm . Any replies are appreciated. Let's start
Hi bros, yesterday I had an idea, pick all the best trend following default indicators on TradingView and made a super TS with the conjunction. Claude from Anthropic did the excellent job. Here is the .mq4 file and a example image
Hi guys. Can an EA be programmed to recognize when a user manually opens or closes a trade from the chart
Hi, I'm using a custom moving average indicator. After updating to build 1491 Metatrader 4, the indicator goes missing from the chart whenever I start MetaTrader. When I reapply the template, it sometimes shows all the indicators I saved, but other times it only shows one . 1. All indicators are
Hi there I installed Metatrader 4 and add an EA to the chart. I am able to configure the settings for the EA and save to a set file But when I request the settings of the Expert advisor after config, I get this screen. The EA does not take any orders. It works on another laptop. What do I miss on
You may have already noticed that the most interesting things now happen mainly on the MQL5.community . MQL4.com is about to be switched to the data archive mode. Only Book and Documentation sections will remain on MQL4.com by November. Besides, the entire MQL4.com Forum content is to be transferred
Custom indicator Heiken Ashi no longer shows up on the chart after auto compiles at the initial load of terminal after the version update Strategy Tester also shows the following errors regarding Heiken Ashi. 0 01:10:42.456 2025.06.01 22:00:00 PlutusV2613 EURUSD.FX,M1: HA Error: Indicator not ready
  Interesting and Humour  (49796   1 2 3 4 5 ... 4979 4980)
Members of the forum, don't forget to follow the rules
Hello, I am posting this in the MQL4 section since there is no MQL5 section to post it in. I am creating a simple chart overlay in MT5 to visually compare two symbols. However the chart overlay indicator does not update in real time it only updates on the close of the bar. Does anyone know what
New article How to Copy Trading from MetaTrader 5 to MetaTrader 4 is published at mql4.com: Is it possible to trade on a real MetaTrader 5 account today? How to organize such trading? The article contains the theory of these questions and the working codes used for copying trades from the MetaTrader...
hi, using MT4 b745 on wine 1.7.32 i386 ubuntu for using an expert i need to add an url into /tools/options/Expert advisor/ there is already the builtin 'http://www.mql5.com' listed when i right-click on '+' nothing happen for adding a new url, so i double click on the previous url's field:...
Greeting , Can anyone help me please with programe lines (code base) to add to my EA -mq4 file simply , I only want the EA to open trades only if RSI value between 65 and 35 for example or 70-30... etc , it would be really appreciated sorry I don't have experience in programming
this script converts the chart's ticks into any Second(s)timeframes !!! the Script works only for XAUUSD, you can modify it to work with other pairs or other names of Gold pair. Example custom periods: S5 S10 S15 S20 S30 S45 S50 Once the Second(s) chart is generated, you can apply almost everything