I guess if an EA work well in live account, it may not be good in tester. If I am right, what should I do to improve my EA ?
Hi I have the following MQL4 code:- if (CountOrders( 0 )!= 0 || CountOrders( 1 )!= 0 ) { for ( int b= OrdersTotal ()- 1 ; b>= 0 ; b--) { if ( OrderSelect (b,SELECT_BY_POS)== true ) { if (OrderSymbol()== _Symbol && OrderMagicNumber()==OrderMagic)
Is there an easier way to do a Git Commit on multiple source files at the same time than to select each file individually and then doing a single file Git Commit? I have multiple source files that I would like to do a Git Commit at the same time as a group. How can I Commit multiple files at the
Hi, I am currently trying to use the class CMoneyFixedRisk::CheckOpenLong(double price, double sl) (from the Expert/Money/MoneyFixedRisk.mqh library) to estimate the appropriate volume to open a long position, for a given risk per trade and a given SL value. My first attempts systematically retuned
Hi all, I have a helper class that saves the pnl history and some other metrics that I use for analytics on my strategies. It runs on the OnTester funcion and locally stores under a backtests folder inside the MetaQuotes\Terminal\Common\Files path. However, when running on the MT5 Cloud Network I
Is it possible to execute OrderSend requests with different magic IDs from the same Expert Advisor?
(3)
My Expert Advisor (EA) supports multiple virtual trading "agents", each with different trading parameters and lotsizes. The Expert Advisor ID ( magic number) is a parameter in the MqlTradeRequest input structure to OrderSend (). It would be very useful to be able to distinguish the various trade
I have a mqproject (consisting of a MyEa.mq5 and a .mqproj file within the folder called "custom") and would like to use indicators from MQL5/Indicators/Examples in my EA. With a simple EA without embedding it in a .mqproj , indicators can be loaded successfully without the need to include them
please correct me if i am wrong i have found that the mql5 bot cant know the on real time while testing the strategy , the values of the indicator and they know only the values at the closure of the candle like for example a 30 min candle how can i fix this ? as i want for example a value to be
Hello All, With the latest MT5 update, I am hitting something I don't understand; a little script to illustrate the compiler warning am hitting: #include <Internal\TimeSpan\TimeSpan.mqh> /* Note: from <Internal\TimeSpanTimeSpan.mqh>: void operator=(const TimeSpan &t) {
Moring to all Im trying to install Metatrader 5 in google colab looking to get some databases. On the next screen shot the errors that I´m getting. Can any one give me a hand or an code or any ideas on how to install this library
This is an ATR step based trailing stop and it works fine in the strategy tester but would like feedback on the SERIES_SYNCHRONIZED and iBarShift checking. Did I do it correctly or am I missing something crucial? Originally I was storing the ATR value in the trade comment since my broker never
The function Oncalculate() can not be used in an expert. So we have to create our indicator separately from our expert and run both the expert and the indicator on the chart. I have a global variable in my indicator(that I wrote it in metaeditor) and I want to change the amount of this variable when
What happens when StringToTime fails to convert a string to datetime? The MQL5 documentation does not say how an error is indicated
It is VERY difficult to debug MQ% programs without some assist to easily display variable values during the debug process. Is there any QuickWatch, Hover over to display variable values, or automatically add local variables in the Watch window? ANY of these features would be very useful. Thanks
I am looking for a Script or EA to purchase that works and reliable to open multiple buy or sell orders at once on MT5 for Mac, does anyone have any recommendations
Hello. I have been trying to publish my Expert Advisor on the MQL5 Market , but the validation process was not successful. The issue seems to be related to the images. In addition, my EA is designed to work specifically with XAUUSD , while the system attempts to validate it on EURUSD , which
Hi all, I run into a strange situation when trying to backtest my EA on demo account (RoboForex ECN). While I can normally backtest forex pairs (EURUSD, GBPUSD...) it looks like that can not be done on Nasdaq (NQU25 expires sept. 2025) it just does not process any tick even though I can see them
Hi all, could you tell me where I can read the code that draws the trendlines between opening and closing arrows for every trade? Thank you
Hi, I've noticed this ever since I switched to MT5 and multi-agent testing around 2 years ago. When testing with all local agents (I have not yet used cloud testing) the task scheduler does not distribute tasks optimally - particularly when getting "near" the end of testing. For genetic optimisation
Hello I just want to make sure I am not going crazy. My MT5 EA is not creating Databases (.db files or .sqlite files) when it is run in the Strategy Tester. Although I can see the EA create a Database when I drop it on a Live chart. I want to make it clear, I am not talking about databases with web
Sometimes I can't understand why it is wrong like the example below: if (bb ) printf ( "@X " + BestEntry + " " + P261_UpDn[tm][SignalIdx].Entry); if (bEntry) printf ( "@Y " + BestEntry + " " + P261_UpDn[tm][SignalIdx].Entry); Why does the result depend on the condition even though the variable
Hi everyone! I'm new to MQL5 and just starting to learn algorithmic trading. What do you think is the best way to start building my first EA? Should I begin with simple moving average strategies, or is there something else you recommend for beginners? I don’t need something profitable right now
I’m currently coding an MT5 EA and I’d like to add an image/logo directly onto the chart (not just text or lines). I’ve been experimenting with OBJ_BITMAP and OBJ_BITMAP_LABEL, but I’m not fully sure how to properly load and display a custom image in the EA. Has anyone here done this before?🤷♂️
Has any body encountered something like this before when trying to test a single strategy? It's weird because I am facing the same problem on all mt5s. I tried running on multiple VPSes, different computer, OSes. Funny but its working for everybody else but me
Hello everyone, I have several Expert Advisors running on different MT5 terminals, all with the same broker. However, sometimes I notice a strange issue: one terminal executes a setup even though the conditions are not met , while on another terminal (same EA, same broker, same timeframe, same
Hi, if have an EA that loads, handles and unloads several indicators. Therefore I created a wrapper class to hold indicator objects in a CHashMap <string ident , cObject obj > Things working fine for indicators like iATR, iMA and others. Now I have a custom indicator that draws a bunch of lines
Hello I wrote a function in order to detect whether my SL was hit: inside the OnTrade() function I compare the Low of the current bar iLow(symbol_,PERIOD_CURRENT,0) with my SL level. For Example if I was long and Low<= SL, I would know the SL was triggered. It turns out that rarely works.... when SL
Subject: Backtest Results Depend on EA File Name – Please Review This Critical Behavior Dear MetaQuotes Development Team, My name is Somchai Suthimanorom, an EA developer and MetaTrader 5 user. I would like to report an unexpected and concerning behavior in the MT5 Strategy Tester, which directly
Hello everyone, I'm developing an EA and upon trying to get the account balance I'm getting the value 0. Does anyone know which is the reason of this? Here there is an example of how I'm getting a 0. void OnInit () { Print ( "OnInit: " , AccountInfoDouble ( ACCOUNT_BALANCE )); } void OnTick ()
I have split my mq5 code for my EA between one *.mq5 file and many *.mqh file so that I can separate my source code according to topic and so that the source is not in just one humungous file. But it appears that when I use Next Bookmark, that it only jumps within the current selected file and not
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.