Expert Advisors and Automated Trading - page 21

Hi all, I’m automating forward tests in MT5 portable using .ini files. MT5 launches with /config correctly, but Strategy Tester does not auto-run. No HTML report is created. All paths, .set, ExecutionMode=4, dates, etc. are set. Is there any way to force MT5 to auto-start the test when launched via
MetaTrader 5 produces different backtest results when you use exactly the same settings for the Visual Backtester and Non-Visual Backtester. When I use the Visual mode everything is normal and goes as expected, when I uncheck the visual mode hoping to get the same results but faster, this is what I
Good morning, I have an EA code that is giving me problems. I would like to replicate in code when I apply a 7-period SMA moving average on the 14-period RSI indicator and I tell it “first indicator data.” I thought it would be enough to take the RSI values and calculate a moving average on those
For some reason during optimization i only have access to 16 cores....How can i get access to the rest of my cores locally? I dont want to use the local network farm, as i remember i wasnt using more than 16
My EA has the following function: int GetHistories( ENUM_TIMEFRAMES timeframe) { MqlRates Rates[]; int copied = 0 ; ResetLastError (); string symbx= Symbol (); for ( int x= 0 ; x<mc.arrsymbx && ! IsStopped (); x++) { symbx=mc.DIRI[x]; string InpFileName = symbx + ".csv" ;
The uchar buffer array contents in MT5 is shown below: Message from DLL (len=19) in C++ reads: std::wstring myString = L "Hello from C++ DLL!\0\0" ; The uchar array contents is correct for the Unicoded text with '0' as part of each UTF-16 character. But MQL5 code string receivedString =
  Call Stack  (3)
While debugging in MetaEditor, is there a way to view the current Call Stack at a breakpoint
I would like to use an array of arrays as in the following code double data[ 2 ][ 1 ]; int indicatorIndex; int OnInit () { int index = indicatorIndex++; SetIndexBuffer (index,data[ 0 ], INDICATOR_DATA ); index = indicatorIndex++; SetIndexBuffer (index, data[ 1 ], INDICATOR_DATA ); } ... But
void OnStart () { Comment ( AccountInfoDouble ( ACCOUNT_PROFIT )); } It always returns 0.0
I'm a little rusty on my coding, but used to code C++ in Qt and KDE. The Medtaeditor reminds me very much of C++. I was coding the Ichimoku editor, and decided I liked the idea of using object oriented programming with CiIchimoku. Right off the bat I noticed that the Chikou data was retrieved by
Hello friends I want to know how can I get LocalTime() Or TimeCurrent() while using strategy tester. As Default during testing in the Strategy Tester , TimeCurrent() is simulated according to historical data. I need the time that are not refers to historical data. is there any DLL to get current
double var_dbl[ 5 ]; long var_long[ 5 ]; void OnStart () { ArrayInitialize (var_dbl, 123 ); ArrayInitialize (var_long, 123 ); ArrayPrint (var_dbl); ArrayPrint (var_long); //Result //var_dbl[123, 123, 123, 123, 123] //var_long[0, 0, 0, 0, 0] } Everyone can test it. Fix it please. Thank you
Validation when publishing Expert Adviser I received a "Not enough money" error, how can I fix it? No issues were encountered in backtesting or live trading
while(!FileIsEnding(h)) { string str = FileReadString(h); } Journal: 2025.06.29 01:40:56.806 MQL5 VirtualAlloc failed in large allocator, size=555032 Experts: 2025.06.29 01:40:56.806 (EURUSD,H1) out of memory in 'MyClass_File.mqh' (1310,15) The (1310,15) is string str = FileReadString(h);
The period switch of the chart in the K-line playback function of MT5 disappeared. How to restore it
Basically I just want to be able to check if there are news events so I could pause my program momentarily for a few minutes to avoid volatility
I am having issues with my simulations, it happens visual mode my expert works as it should, but when I try non - visual mode, shows a lot of mistakes , my expert is a multiframe expert that looks for several timeframes from biggest to smallest with confirmations in several times. I don´t think it
  Strange results of testing  (19   1 2)
Hello. I have coded EA and when start testing figure out strange things ( may be it strange just for me :) ) but want to understand how it possible. Test in Roboforex : test in ICMarket : Positions was opened and closed +- with the same price and same lot , but Roboforex make 161.62 $ lost and
Hello all, I am getting these messages "no real ticks within a day" in the Journal tab when running a EA test. It happens with EURUSD, XAUUSD, USDJPY, and more. It happens in two different computers (one running Linux and another one running Windows) It happens for any EA I tried. It happens while
Hi everyone, I’m trying to get 1-minute candle data for XAUUSD covering the last 20 years, but MetaTrader 5 only seems to provide data for the last 2-3 months. I’ve heard some users might have accessed longer historical data or something. Can anyone share how they did it? Are there specific
Hi all, I've been searching through the MQL5 documentation and forum, but I can't seem to find a way to programmatically control the screen position (X, Y) of chart windows in MetaTrader 5. I know that we can control the chart size using: ChartSetInteger(chart_id, CHART_WIDTH_IN_PIXELS, ...);
Hey everyone, I'm running Python 3.12.5 and trying to get MQL5's MetaTrader5 installed and running. In an empty venv (I purged the cache just to be sure), I use 'pip install MetaTrader5' which installs the package and also installs it's one dependency -> numpy. So my virtual environment has just
Hi I'm trying to upload my Expert Advisors for Market. However I face error with automatic validation. no trading operations error 131 ERR_INVALID_TRADE_VOLUME I visited the page of how to fix but I don't understand &description that is in the function. bool CheckVolumeValue(double volume,string
Can someone assist me in understanding what I might be doing wrong that is causing the issues with the progression in strategy tester. It seems to get hung and won't progress to give me results. See attached. Any guidance would be greatly appreciated
Hello everyone, I'm facing a recurring issue while running Expert Advisors (EAs) on MQL5 VPS, and I’m hoping someone can shed some light on what’s going wrong. Everything starts off working perfectly — my EA is attached to the chart, synced to the VPS, and trades are being executed regularly
  EMPTY file  (12   1 2)
hi guys, I think I have an issue with some of my codes specifically when i upload them on telegram and then re-downloading them after a while like 2 3 days, on telegram and windows that file's size is 44kb but when i open in metatrader editor there is nothing inside. how this is possible
  Optimize without fees  (12   1 2)
Hi Is there a way to optimize an EA without any fees ? to be able to see if a strat has an edge, regardless of the fees (that skew the results) I know you can in MT4 (just set zero spread) but I wasn't able to do it in MT5. thanks Jeff
Hello. I've just updated my MT5 to 5.00 build 5120. I'm running it with /portable When I start strategy tester I get this error (on every symbol, every date range, local agents, remote agents, whatever) When I run without /portable it works fine. It doesn't even create the Tester or
Hello! I have a problem when backtesting a custom symbol "GER40". When I do a backtest, the first trade opens but printing some errors (log attached below). This error makes the visual test freeze for some seconds and if it's not done visually it still appears in the log of course. The error says
Hello guys, my problem is MT5 MIX all trades from all timeframe that each bot make from charts.Ex. EA trade on char 1" 100 DEALS and same ea on chart 3" 200 DEALS,with other magic number. Thanks and please, let me know if there is a better way to treat this problem (using chart)