Forum

Array out of range for mrate[i].close when backtesting only!

This piece of code is giving Array out of range error only when backtesting. When EA is running. No errors whatsoever! CopyRates (symbol, PERIOD_D1 , 0 , 30 , mrate); for ( int i = 0 ; i < 30 ; i++){ ArrayCount = VolumeArray.Size(); if (( int )mrate[i].close % 10 != 0 )

Anyone knows a way to change the magic number of an already placed position?

Hi, I have already placed positions with certain magic numbers, along the way i want to be able to change the magic numbers as i go. Is there a way to do it through coding? I know that there is no way manually. But i hope MT has thought about this and gave us the ability to change through code. I

VPS/Experts tab - Cannot load executable module "ExpertAdvisor Name" from c:\hosting\instances\xxxxxxxxxxxxxxx\MQL5 subfolder

Cannot load executable module "ExpertAdvisor Name" from c:\hosting\instances\xxxxxxxxxxxxxxx\MQL5 subfolder My Expert Advisor has always worked just fine, just today after updating the version i started getting this error message and the EA is no running on the VPS . I have two VPS both with the

Is there a way to hide input variables from the user based on enum selections?

Hi all, Is there a way to hide input variables from the user if he selected different enum. For example, i have 3 different cases under one enum. Based on the user selection, i want to show some input variables and hide others. Is that possible with MQL5? Thanks in advance

build 2715 causes blue screen of death, lose of all registered accounts!

Accepted the update today, restarted, since then about 10 times once it runs and i try to do any back testing or optimization, it causes the blue screen of death on windows 10. After few times of this happening and trying to figure out what happened. MetaTrader lost all my registered accounts! Now i

MetaEditor ate my source code overnight!

Has anyone experienced this before, The source code that was open in MetaEditor for the past week as i was working on it, has disappeared over night! I opened the laptop led today only to find that the whole code is gone, it's no where on the hard drive! The compiled file still there, but the source

Difference between brokers and EAs.

I have EA that works perfectly on ICMarkets, but when tried on FXChoice it give totally different results. Trading exact same Symbol, for example XAUUSD , both brokers have the same symbol, same charts. But on one side the EA is performing as it should, when on the other side, it fails. What is the

help again with adding product to the market.

I understand what it means, but I don't know why it's showing when testing on MQL5 strategy tester it yields no errors at all. Also what is wrong with buy 1.78 EURUSD at 1.12335 ? Can someone shed a light on this? 2019.04.01 00:03:31 failed instant buy 1.78 EURUSD at 1.12335 [Invalid volume]

How can you use a built in indicator like iMA, in your EA without showing it on the chart?

I have included some built in indicators in my EA, but i don't want to show them on the chart, how to achieve that

MQl4 Timeframes for trading and strategy testing is limited to 7 periods only?

Hi everyone, I have just switched to MQL4 coming from MQL5 only to be shocked by few things that's MQL4 limited to. For example the limitation of viewing charts in the usual Timeframes of MQL5, and having to go around that with using the Period Converter. Which is not bad, but i don't understand why