Discussion of article "Simulink: a Guide for the Developers of Expert Advisors"

 

New article Simulink: a Guide for the Developers of Expert Advisors is published:

I am not a professional programmer. And thus, the principle of "going from the simple to the complex" is of primary importance to me when I am working on trading system development. What exactly is simple for me? First of all, it is the visualization of the process of creating the system, and the logic of its work. Also, it is a minimum of handwritten code. In this article, I will attempt to create and test the trading system, based on a Matlab package, and then write an Expert Advisor for MetaTrader 5. The historical data from MetaTrader 5 will be used for the testing process.

Author: Денис

 

Only something does not work your Expert Advisor, does not open trades at all(((

 
ZahvatkiN:

But your EA doesn't work, it doesn't open trades at all((.

Can you be more specific? Are we talking about the EA that is in the file mts.mq5 ?

Have you tested it on history?

Files:
mts.mq5  11 kb
 

Yes, I downloaded the Expert Advisor and one more file, I ran it on history and it didn't open a single trade, I tried it on different timeframes, maybe I missed something...And you have everything working?

 
ZahvatkiN:

Yes, I downloaded the Expert Advisor and one more file, I ran it on history and it didn't open a single trade, I tried it on different timeframes, maybe I missed something...Does it work for you?

ZahvatkiN, please read the sections again:

2. description of trading strategy

4. Strategy implementation in MQL5

Download the history... everything works for us...

Change the input parameters for the sake of interest...

 

I copied only 2 files, the Expert Advisor Experts\mts.mq5 compiled without errors and the file Scripts\testclose.mq5, which at compilation gave 8 warnings, the parameters in the properties changed, as stop and take levels and muwings, all the same on any time frame pulse is absent))). The scan of errors is attached.

Files:
1.jpg  490 kb
 
ZahvatkiN:

I copied only 2 files, the Expert Advisor Experts\mts.mq5 compiled without errors and the file Scripts\testclose.mq5, which at compilation gave 8 warnings, the parameters in the properties changed, as stop and take levels and muwings, all the same on any time frame pulse is absent))). Scan of errors attached.

Cause of error 4756

 

where can you watch/download the video ?

 

Hi!

How can I just add the opening of the initial lot to the Expert Advisor, so that I don't have to open it all the time?

 

And another article that is very good, but the translation is a bit tricky.

Simply chasing everything through a programme is quick but pointless when it comes to computer commands.

[ema21, ema55] = movavg(close, 21, 55, 'e');

is translated into

[ema21, ema55] = gltDurch(schließen, 21, 55, 'e');

Which of course can't work.

I hope this has just been overlooked.

 

The files are only executable if you recreate the two virtual buses (InputBus) with the 4 signals open,ema21,ema55,num

and (OutputBus) with the other 10 signals. These are not saved in the Simulink file as it is in the workspace.

So create and then save the workspace.


I was able to successfully create and simulate the project with Matlab 2016b and create a DLL from it, but only via the embedded coder because the communication

with Visual Studio produces errors. This communication is very shaky. On some computers it goes smoothly and VS starts with the loaded project sometimes it crashes.

If I successfully create a strategy via Simulink as a Dll and can then integrate it into MT5, I will report back.