Discussion of article "Create Your Own Trading Robot in 6 Steps!" - page 6

 

Using the instructions in this article, I tried to create my own signal and EA, but the signal persistently does not want to appear in the list of signals "MQL Wizard".

The Expert Advisor does not make transactions and does not draw some indicators during testing. I tried to create my own signals and Expert Advisors and remake them from working signals and Expert Advisors.

When downloading signals from the site, they also can not be inserted into the list of signals "MQL Wizard", although Expert Advisors and signals work perfectly. Sorry for the questions of a newbie,

but from the forum discussion, I realised that similar problems occur, but I didn't understand how to deal with it. This is a problem of the terminal or the code.

I tested on VTB24 and Insta terminals. Compilation does not see any errors. What number of indicators is possible when creating a signal

Files:
HetireEMA.mq5  13 kb
Signal4EMA.mqh  15 kb
 
I am not a master of programming in mql5, but from this article I concluded that to write a simple expert on the intersection of 2 MAs, in mql5 you need 2 files, and plus some complicated writing a lot! In mql4 for such an Expert Advisor you need no more than 10 lines and it's done!!!!! It turns out that if in mql4 is spent on the EA for example 1 day - in mql5 you need to kill the same EA as much as 3, at best 2 days!!!! And I also understood the difference between these two languages only in the fact that in mql5 you can make all sorts of beautiful and functional panels and that's all, and from the fact that it is written in mql5, this expert will not trade better! Criticise and change my mind.
 
zlodei:
Criticise and change my mind.
Try reading it again.
 
zlodei:

I am not a master of programming in mql5, but from this article I concluded that to write a simple Expert Advisor on the intersection of 2 MAs, you need 2 files in mql5, plus a lot of complicated writing!

The conclusion is erroneous, as you are offered ready-made universal solutions. And such solutions do not exist in two lines

If you need a robot purely on the intersection of 2 MAs, specifically for your task, it can also be written in MQL5 in 10 lines and it's done!!!!

 

The Expert Advisor I created (hetireema.mq5) somehow miraculously worked on InstaTrader5 terminal (matured without unnecessary manipulations), but the signal is not visible in the Wizard (not matured yet). More complex signals created by analogy with 7 and 10 EMA- and again do not work, although the compiler does not see any errors, in the terminal the files of the Expert Advisor and signal are present, in the tester the Expert Advisor is present, input parameters are set, but trades are not made. I.e. mql5 language with vagaries or terminals with glitches.

It is really very difficult to create code in mql5. To describe the mutual location of several EMAs you need 500 lines of code, or even more. The bulk of the code is checking for errors and conditions that overload the code. I created robots on the terminal AstTrader (ActFX (Pascal) language), there trading robots can be made 50 pieces a day with any set of indicators and conditions. The robot takes 2 pages without unnecessary codobludy. However, testing is extremely slow and the candlestick history is very VERY!!! short. In MQL5, the speed and a long candlestick history were a great advantage. You have to choose between writing robots for weeks or testing robots written quickly. If MQL4 cancels all these disadvantages, I will go there. Although the discussion of languages is probably a different branch of the forum.

 
alextxpert99:

The Expert Advisor I created (hetireema.mq5) somehow miraculously worked on InstaTrader5 terminal (it matured without unnecessary manipulations), but the signal is not visible in the "Wizard" (it has not matured yet).

Are you sure you have done everything according to the recipe?

  1. Create a new class using the MQL5 Wizard in a separate folder MQL5/Include/MySignals/. It will contain our trading signals module.
    .
  2. Create a module descriptor that describes the parameters, their type and default values.
  3. Declare the module parameters in the class itself and add methods for initialisation in the constructor.
  4. Check the input parameters for correctness and don't forget to call the ValidationSettings() method of the CExpertSignal base class.
  5. Create indicator objects and add the predefined InitIndicators() initialisation method.
  6. Define the conditions of occurrence of trading signals in the LongCondition() and ShortCondition() methods.
 
I'll try again and again. I'll let you know the results.
 
Thanks for the support!!! There was an error in the module descriptor -(Type - indicates the version of the signal module. It should always be SignalAdvanced;). I corrected it and the signals appear in the Wizard. Indicators do not appear in signals where their number is more than 4. When creating an Expert Advisor, I will try to compose several simple trading signals of the same type.
 

A very well written article which, however, left me frustrated as already for the first/second (?) step I got two error messages:

In line 10 the compiler was able to find but not to open the file "ExpertSignal.mqh". I cross-checked this by downloading the attached file "MA_...", which the compiler gave the same error message for. Then, of course, it was also not able to discern the structure of "CExpertSignal" in line 33 ("MA_..."), thus derailing the whole process. 

What was wrong there?

Thanks!

Locan.BBS

 
locan.BBS:

A very well written article which, however, left me frustrated as already for the first/second (?) step I got two error messages:

In line 10 the compiler was able to find but not to open the file "ExpertSignal.mqh". I cross-checked this by downloading the attached file "MA_...", which the compiler gave the same error message for. Then, of course, it was also not able to discern the structure of "CExpertSignal" in line 33 ("MA_..."), thus derailing the whole process. 

What was wrong there?

The ExpertSignal.mqh is located in terminal_data_folder\MQL5\Include\Expert\ExpertSignal.mqh.

Maybe the problem is wrong location of MA_Cross.mqh (it must be created in terminal_data_folder\MQL5\Include\Expert\MySignals\MA_Cross.mqh):