Expert Advisors and Automated Trading - page 10

  Current Profile  (2)
Hi All, I pride myself on finding answers to my problems as I learn MQL5. I have however, been stumped by this one. I just need the name of the currently active profile. A search returns Current.Profile() but I cant find any reference to it nor does it work in the editor. The reason I am looking for
Hello, I noticed a strange behavior when using the default "Moving Average" EA on the MetaQuotes demo account. (It is not my own EA, just the built-in default one.) Steps to reproduce (see attached screenshots): Open two charts: EURUSD H1 (left) and USDCHF H1 (right). Drag and drop the "Moving
I have just moved from MT4 to MT5. I was looking forward to the additional features that the MT5 Strategy Tester provides, but I am hugely disappointed in some aspects that are far inferior to the MT4 Strategy Tester. I have an EA with a large number of parameters, and when I do a Genetic
Hello, recently i have started to backtesting an EA with the slow complete algorithm optimization setting. I have planed to do a big algorithmic test of all the features of my EA ( ~80 settings) so there is 2.2e+52 combinations. I was okay with this and when i launched, an alert message in the
I have had several issues with EAs around this: When I change the risk level from 0.01 to 0.05 or something, it does not change on the EA, and the EA keeps making orders at 0.01. I've tried many different things to re-set the platform or EA. I'm using Pepperstone, MQL5, AUX/USD on 1 or 5 minutes
I just bough intel core ultra7 265k in the window showing 20cpu but after optimizing with MT5 it has only 8Agent and also in Agent manager showing only 8
Hello, I have a question about newly introduced Calendar in MQL5. Is it only used for closing open orders before the economic news ? Or it can be used for opening new orders depending on the content of the news? I mean, does the news contain actual figures rather than planned event data? For ex, if
I’m trying to export my strategy signal data into a .csv file. The file is created successfully in MQL5/ , but instead of agreement_export.csv I always get a file with .dat extension. Could someone explain why this happens, and what is the correct way to force MT5 to generate a proper .csv instead
Hi, I am currently using Tick Data Suite to test a very simple EA. It is a martingale EA with no entry requirements. Basically it just opens trades when auto-trading is switched on and uses martingale to exit with a profit. So basically it will make money when there is volatility and retracements
Good morning, I got two issues. 1) On My Metatrader 5 instance in the past I used the cloud agents for simulation. That worked brilliant. Nothing was changed I only deactivated them as I wanted to peform a small test just on my pc. Now I can't reactivate them. I I right click on them, the option to
Good morning, I'm having a problem with Metatester. On Metatrader, I clearly see my 56 available threads. However, when I try to share them on Metatester, this number drops to 28, as if only one processor was detected. Could you please advise me on how to solve this problem? Thanks in advance
I have a problem, I'm running MetaTrader 5 Strategy tester with 8 agents (my computer has 16 cores). He hasn't worked for me for a month. There is no collision with the anti-virus program. Reinstalling didn't help either. All 8 testers are marked as "not connected" in AgentsManager. I have Win 11
Hey I deposit $15 to get the monthly vps but is not letting me purchase it
  Trend lines  (2)
Good day. i need some help please. I am trying to get the highest and lowest price of 30 candles starting 2 candles back. if i use 2 at the start point it doesn't give me the value and time of the highest and lowest bar. if i use 0 at the start point then it work fine but i don't want bar[0] and
  VPS  (2)
Hello. I purchased a VPS, but it won't open positions from my EA. What could be the problem? Without a VPS, it works normally, but with more slippage. 14:24:44.073 History: first bar USDJPY+,M1 on the server is 2025.07.03 01:48 0 14:24:44.073 History: first bar USDJPY+,M1 on the server is
Hey guys, is it somehow possible to find out how many candles are shown on a 800x600 screenshot before the screenshot is made? I know there are some variables like the chart shift and the chart scale. But I have no idea how to find out the number of candles before the screenshot is made. Any help is
I want to update the ask value for all ticks and reduce the spread by 50%, but the program only update 1 tick finally as shown by the print function . Can anyone help me to fix the problem ? void OnStart () { MqlTick ticks[]; if ( CopyTicksRange ( _Symbol ,ticks, COPY_TICKS_ALL , 0
  Will the EA crash ?  (18   1 2)
I've got an ea that downloaded all available ticks from a broker for a symbol . It reached 250 million ticks , and , the MqlTick structure is 52 bytes per tick. (13 gigabytes) It placed it all in memory .I've got decent RAM on the machine so it held. If someone with 8GB of RAM runs it will they get
Hello traders. im opening this topic in order to discuss and find the way of using HFT eas in normal brokers.. lets see if we can figure it out
CHistoryOrderInfo StopLoss and TakeProfit values are 0.0 at OnTradeTransaction case TRADE_TRANSACTION_HISTORY_ADD when CHistoryOrderInfo TypeDescription = ORDER_TYPE_SELL I am writing a MT5 Expert Adviser (EA) that Buys long positions and maintains both a trailing SL and a leading TP. The EA will
Hello All, I have just received version 5 build 5260. I have for the past three years and continue to generate my EA magic numbers auto magically with the following code: /* make_long_random() * * Make a big 64 bit random number * Typical uses? create a random EA magic number. * * Parameters: None *
I have a few EA's that I concider profitable but take immense amounts of time for backtesting in real ticks. Open prices work but sometimes the variance to real ticks is over 40% which make the backtesting results unacceptably unrealiable. The idea is to comission a developer here to "rewrite" the
Hi all, since the update to 5200 (and now with 5227) the strategy tester is not updating the charts if i switch between different timeframes. My expert uses 3 different timeframes - 3 indicators with separated times. After this 5220 update in the bottom of the tester chart three tabs are displayed
The string produces by CDealInfo.TypeDescription() is not a string representation of ENUM_DEAL_TYPE identifiers. For example, a CDealInfo. DealType = 0 is DEAL_TYPE_BUY in ENUM_DEAL_TYPE , but for CDealInfo. DealType = 0, CDealInfo.TypeDescription() returns the string "Buy type" (length: 8) in the
https://www.mql5.com/en/docs/runtime/imports I want to refer to the import of structs. Structs can be passed by reference. In the import section you define like void MyFunc( mystruct &data ); And within C# you define the param as IntPtr. public static void MyFunc( IntPtr data ) Then simply use
Debugging my EA, I am getting: Journal: 2025.09.03 07:37:44.290 MQL5 debugger Critical error while running expert 'PolishedGoldEA (XAUUSD,M15)'. Unknown error. The Debug tab shows no Trace data at the error. I searched Forum for Debug Critical Error and it said that the error information will be on
I added the cores and i can some they show up on my local agents (some of them not all of them). When conducting the back test the status just alternates between connecting and ready they dont actually do any work. What am I missing here
  Function  (9)
Good day I'm still new to mql5 and the following idea crossed my mind. Is it possible to create a function with a indicator inside the function. For example Check_Entry(). Now I want to create 3 indicator inside this function and call the function into the ontick function but what I want to know is
I'm looking for a fast way to obtain price in text, is there an EA that allows me to copy price to my clipboard using crosshair to point to the price I seek? Tradingview, you can copy price, possible to do this on mt5
Hi guys, I hope you are doing well. A newbie here. I am backtesting a trading strategy on some MNQ tick data stored in a csv file. When launched, the EA opens the file successfully but I receive the message "0 ticks, 0 bars generated". Any idea why the data is not being read. I am using MT5 on a