Issue with EA backtesting on Libertex – No trades executed

 

Hello everyone,

I am encountering a problem with the backtests of several Expert Advisors (EA) on MetaTrader 5 using the Libertex broker. I have found that neither the EAs I have developed nor the ones I have downloaded (even those highly rated on the MQL5 market) execute backtest trades, while the free EAs that come with MT5 work normally.

 
Pierre PELMOINEHello everyone, I am encountering a problem with the backtests of several Expert Advisors (EA) on MetaTrader 5 using the Libertex broker. I have found that neither the EAs I have developed nor the ones I have downloaded (even those highly rated on the MQL5 market) execute backtest trades, while the free EAs that come with MT5 work normally.

Hello, what messages appear in the Journal tab ?

 
Vinicius Pereira De Oliveira #:

Hello, what messages appear in the Journal tab ?

Hello, Vinicius Pereira De Oliveira. Thank you for taking the time to respond to my post. You will find the logs and screenshots attached. It keeps telling me "debug version of "20240417\20240417.ex5" detected" in MT5 and "failed to process command #13" in Meta Editor but I don't know what it's due to because when I click "Open", I don't see anything in the folder except the log files. Do you need to see my code?

 
Pierre PELMOINE #Hello, Vinicius Pereira De Oliveira. Thank you for taking the time to respond to my post. You will find the logs and screenshots attached. It keeps telling me "debug version of "20240417\20240417.ex5" detected" in MT5 and "failed to process command #13" in Meta Editor but I don't know what it's due to because when I click "Open", I don't see anything in the folder except the log files. Do you need to see my code?

Hello Pierre PELMOINE, apparently you tried to debug your code, right? Please follow the guidelines in the topic below to try to restore normality (in that case it worked):

Error: Tester - debug version of "Advisors\EA.ex5" detected - MT4 - Expert Advisors and Automated Trading - MQL5 programming forum

 
Vinicius Pereira De Oliveira #:

Hello Pierre PELMOINE, apparently you tried to debug your code, right? Please follow the guidelines in the topic below to try to restore normality (in that case it worked):

Error: Tester - debug version of "Advisors\EA.ex5" detected - MT4 - Expert Advisors and Automated Trading - MQL5 programming forum


Hello, Vinicius Pereira De Oliveira. I tried to do what you sent me. It did not work. I reset my MT5 dashboard. Reviewed my code completely. It still does not work. This is the first EA I've coded. You will find it below. Do you see anything unusual? I no longer have any errors in the logs.
Files:
202419.mq5  4 kb
 
Pierre PELMOINE #Hello, Vinicius Pereira De Oliveira. I tried to do what you sent me. It did not work. I reset my MT5 dashboard. Reviewed my code completely. It still does not work. This is the first EA I've coded. You will find it below. Do you see anything unusual? I no longer have any errors in the logs.

1. Variables ema9 and ema200 must be of integer type.

2. The code below has been transferred to OnInit():

// Calculate EMAs
   ema9 = iMA(_Symbol, PERIOD_M15, 9, 0, MODE_EMA, PRICE_CLOSE);
   ema200 = iMA(_Symbol, PERIOD_M15, 200, 0, MODE_EMA, PRICE_CLOSE);

3. Added variables data_ema9[1] and data_ema200[1] of double type.

4. Added the code snippet below:

//--- Moving Average indicator
   if(CopyBuffer(ema9, MAIN_LINE, 0, 1, data_ema9) < 0)
     {
      Print("Failed to copy data from EMA9 indicator...");
      return;
     }
   if(CopyBuffer(ema200, MAIN_LINE, 0, 1, data_ema200) < 0)
     {
      Print("Failed to copy data from EMA200 indicator...");
      return;
     }

Now the EA opens position. 😊

Files:
202419.mq5  5 kb
 

Hello, 

I am currently experiencing something very similar. The EA I develop is not executing trades on backtest.

The alarm I get on the journal is simply 'There were 1 passes done during optimization, 1 results have been discarded as insignificant' and 'Tester margin exchange rate can not be calculated'.

I am stuck and can not proceed further.


See the attached

Files:
20240421.log  23 kb
 
Jaydee0 #Hello,  I am currently experiencing something very similar. The EA I develop is not executing trades on backtest. The alarm I get on the journal is simply 'There were 1 passes done during optimization, 1 results have been discarded as insignificant' and 'Tester margin exchange rate can not be calculated'. I am stuck and can not proceed further. See the attached

Hello, run the EA in the Strategy Tester in TESTER mode (not OPTIMIZATION) and see the messages that appear...

 
Vinicius Pereira De Oliveira #:

Hello, run the EA in the Strategy Tester in TESTER mode (not OPTIMIZATION) and see the messages that appear...

Thank for the feedback.

I ran it on testing mode and got same message.

See attached

Files:
20240421.log  32 kb
 
Jaydee0 #Thank for the feedback. I ran it on testing mode and got same message. See attached

Test it on EURUSD to see if it works...

 
Vinicius Pereira De Oliveira #:

Test it on EURUSD to see if it works...

Done but still no executed trade.

See error messages attached.

Files:
20240422.log  35 kb
Reason: