Expert Advisors and Automated Trading - page 5

Can anyone explain. I use an EA and VPs? It says connection lost.. for as long as it says “Network” the connection is lost? And once it says “trades” the EA reconnect again ? For 16 ‘ I was off or I wasn’t
symbol GER40-JUN25 in broker. When the chart is opened on the daily timeframe it goes all the way back to december 2021 when i poll for ticks the broker stops me up to 3 months ago , on march. when i poll for ticks on GER40-MAR25 which has probably existed i get error #4401 history not found. Is
  Periods.mqh?  (2)
Hi... anyone know where I can find this( Periods . mqh ) header file, cant find it anywhere and its used on an example to find objects so wont work? Its on an example on here in a include file... #include < MQL5Book / Periods . mqh > , but cant find it. I've searched high and low, even searched <
I'm using CustomRatesUpdate() function . It costs up to 2-3GB of disk space on real time running interval 1 sec in 24 hours (version A) but while I copy M1 timeframe data from server then CustomRatesUpdate() from 8/2024 just in 7MB (version B) . CustomRatesReplace() also has the same effect Version
What is wrong: ouble GetStochasicValue( string cPair, int nPeriod, ENUM_MA_METHOD , ENUM_STO_PRICE price, int bar) { double sto[ 1 ]; int stoHandle = iStochastic (cPair,nTimeFrame1,nPeriod,price); if (stoHandle!= INVALID_HANDLE ) { CopyBuffer (stoHandle, 0 ,bar, 1 ,sto); }
Hello all, I have been trading the Forex market for 4 years and I need automated trading strategies due to a change in my employment status (and I'm not a very profitable trader and need a change in direction.) I am looking to find out if anyone has past/present experience or considering automated
Hi everyone, I’ve been working on a small-account trading strategy specifically for XAUUSD on the M5 timeframe . It’s fully automated, but I’m not here to promote anything – just genuinely curious how experienced traders would approach this kind of model. I’m testing the following principles: Very
Hey guys I'm new to using MT5 and have been developing some EAs recently all has been going well with backtesting for the last few weeks then all of a sudden the visualisation just stopped working? if anyone can help with this would be very much appreciated. Thanks
  Test todays bars  (4)
Is there a way to test todays M1 bars or should i wait till tommorrow
void OnChartEvent ( const int id, const long & lparam, const double & dparam, const string & sparam) { if (id == CHARTEVENT_KEYDOWN ) { Print ( TerminalInfoInteger ( TERMINAL_KEYSTATE_CONTROL )); } } On a key down event, it will print the states of the Ctrl key. It
Artificial intelligence (AI) is changing the way we buy and sell in the stock market. This discussion is about understanding how computers use AI to make quick trading decisions. We will look into how AI can spot patterns in the market, make predictions, and decide when it’s a good time to trade
Hello When I initially backtest my system, I test using all market watch symbols and then I individually backtest each result that shows positive performance. The problem is, the individual backtest doesnt match the all market watch symbols test. For example. Here are the top performing symbols
Hello team, months ago i bought an expert from MQL5 as i tested it before and the results was amazing. but when i bought it the way how the EA works is way diffrent and it keeps losing trades. however the author has deleted the EA after a while and not even updating the expert. The EA made me much
hello i need mql5.mqh file for include library
Hi. Could someone point me out where to find the drawing tool for charting LONG/SHORTS positions within the graph? Like the one in the pic attached. . I
Good morning I see in the doc SymbolInfoSessionTrade - Market Info - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5 What is it for? uint [in] Ordinal number of a session, whose beginning and end time we want to receive. Indexing of sessions starts with 0
I had a lot of problems in my code with ArrayInitialize() function after the new mt5 build 5100, so i made a workaround for me and i'm sharing here, sorry for the late as the corrections are probably coming in new build announced (build 5120). I'm posting directly here in 'General Forum' section
“Vast sea of EAs, zillion good-looking robots, each promising riches, but leaving traders and investors stranded on the shores of uncertainty.” © My contribution toward: – MetaQuotes analytical tools and metrics for evaluating strategy performance – more transparent and informed trading
Let me preface this with the following : this might not be a terminal issue but it looks like a terminal issue. The code is creating a lot of objects and has 2 indicators embedded in the EA. 1 indicator is used normally the other is a workaround for the following. On deinit the terminal has no time
the strange thing is, the expert just did well in testing, it was able to trade in tester without problem. now no matter what I do, it pops a  [trade disabled] error each time EA tries to open a position. trade disabled in tester ??? how ? and why it happens suddenly, without changing anything ?...
MT5 version 5.00 build 5062 on 3 Jun 2025 Code to reproduce attached. I have discovered that MT5 overwrites any dynamically-created object's member that contains the name of the <current chart symbol> with a <new chart symbol> when ChartSetSymbolPeriod(ChartID(), <new symbol>, _Period) is called
Hello, i still have problems to get HistorySelect properly. Basically, HistorySelect does not return orders latest place. They can be seen in the history tab but are not reflected through History order list. Find attached a simple EA proving this. Simply open a position with BUY or SELL...
Greetings, I'd like to detect when the SL or TP level is hit and take appropriate action. Is the following snippet correct? void OnTradeTransaction ( const MqlTradeTransaction & trans, const MqlTradeRequest & request, const MqlTradeResult & result) { if ( HistoryDealSelect (trans.deal)) {
Hi, When using the "Strategy Tester" with "Single" and backtesting an EA with "visual mode with the display of charts, indicators and trades" checked, has anyone else also get the error "cannot load indicator 'average true range' [4805]"? I got this error after MT5 updated. When I try to run the
  Issue with strategy tester  (16   1 2)
Hey guys, I have been encountering an issue with the strategy tester on MT5 since some time. I used it before to run tests and everything worked perfectly until yesterday I launched a backtest and it kept getting stuck at the stage of loading data. I will show you a picture of what the Journal is
I was converting my own indicator from MQL4 to MQL5 and while I'm pretty good at both standards, the result in MQL5 was wildly different. the culprit was some uninitialized local variables inside loops, that which worked well under MQL4 but crazy under MQL5. // Something like this in MQL4 will
Hi all, I'm now trying to integrate my bot developed in nodejs with MetaTrader5. I could install the npm package called mql5-connector-js but I don't know what to do in the MT5 side to make all features work. Has anyone done this before? Thank you
I made an EA that compiled without problems... but when I tried to test it, no sells or sales were made. How can I solve this problem? //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Software Corp." #property link
Hi guys, first of all I'm not a coder and so I tried to create a bot with deepseek. I managed to create it , the strategy work on candle rejections based on pips. The problem is that in every tick backtest the bot is profitable but in every tick based on real tick and on live trading , the EA it's
Hello, I'm not sure about this EA being overfit or not. How do you go about evaluating overfitting? Are there any books, articles? Backtest settings (50ms is my actual delay on my pc) 2021-01-01 -> 2022-01-01 2022-01-01 -> 2023-01-01 2023-01-01 -> 2024 -01-01 2024-01-01 -> 2025 -01-06 2021-01-01 ->