Simple RSI EA - wont trigger open or close in Tester. Code copied from online tutorial

 

Hi all,

Moderately experienced VBA Coder just getting into Forex and MQL5 coding here. Novice level MT5 user and coder, I can mostly follow the code done intuitively but there are some structures I struggle with (compounded by the usual issues of reading someone elses code). The guy I followed in the video link below is pretty clear though - code is reasonably well annotated etc.

The issue is described below but first step is to see if it runs on someone else's MT5. I suspect there's an issue with my testing setup - one other file I downloaded from the same author doesn't trigger trades on my machine, but purportedly does on theirs. I only have access to their compiled binary so I can't check/compare code.

Today's log file attached along with MQ5 file which compiles with 0 errors, written by me effectively copy typing as I followed along with the video here:

https://www.youtube.com/watch?v=jjI8_omc8Gc

A key minus for me is my lack of understanding on how to drive the MQL debugger. Still working on that one. I would like to check variables and values going into some of the key event triggers (starting with lines 116 and 128 which trigger the trades.

Happy to do the work, prefer to learn so I'm not bringing too many newbie questions to the table... but any pointers appreciated.

Tester setting used are below, let me know if there's anything I've missed in this post


Cheers

Nigel

Code a simple RSI EA in mql5 | MT5 Programming
Code a simple RSI EA in mql5 | MT5 Programming
  • 2023.01.08
  • www.youtube.com
Today I will show you how to code a simple RSI EA for Metatrader 5. If you are new to mql5, just follow my steps and we will create a fully working RSI Expe...
Files:
RsiEA.mq5  8 kb
20231112.log  14 kb
 

Hi all - solved...


An overnight thought made me try changing my test account from my BlackBull.com back to MetaQuotes which solved it. Trades are showing up when run on MetaQuotes not BlackBull.

Is that normal for non MetaQuotes Accounts?

 
Nigel Kelly #: Hi all - solved... An overnight thought made me try changing my test account from my BlackBull.com back to MetaQuotes which solved it. Trades are showing up when run on MetaQuotes not BlackBull. Is that normal for non MetaQuotes Accounts?

It is only "normal" when an EA does not properly read the contract specifications for a symbol and adjust calculations accordingly.

For example, the maximum and minimum allowed volume, the volume step, the quote tick size and its corresponding tick value, the Stops and Freeze levels, etc.

However, in this case, the problem may have been something else (but I am not certain), as reported in the log ...

CS      2       10:43:00.299    MQL5    debug version of 'RsiEA.ex5', please recompile it
 
Fernando Carreiro #:

It is only "normal" when an EA does not properly read the contract specifications for a symbol and adjust calculations accordingly.

For example, the maximum and minimum allowed volume, the volume step, the quote tick size and its corresponding tick value, the Stops and Freeze levels, etc.

However, in this case, the problem may have been something else (but I am not certain), as reported in the log ...

Thanks for this - I'll recompile and try again... 


I set a break point in the code while trying to work it out so that may be what you see in the log but I can't confirm ... yet...