Discussion of article "Universal Expert Advisor: Trading in a Group and Managing a Portfolio of Strategies (Part 4)" - page 2

 
Kuzmich:

Hi.

Interesting material. I have read it and decided to try it in practice. I am trying to compile the attached Expert Advisor Agent.mq5 in MT5 Build 1295. All files are error-free, but at the end "Internal compiler error." :( Can you tell me where to dig?

Updated build to 1297 - same error :(
 

Yes, this problem occurred on the new compiler. I have already made a request to servicedesk. They promised to fix it.

The problem occurs when trying to compile the Expert Advisor control panel. So far the solution is as follows: exclude the panel from the project. I have attached StrategyList1.mqh below. Try to replace the old StrategyList with it. It should help.

Files:
 
Vasiliy Sokolov:

Yes, this problem occurred on the new compiler. I have already made a request to servicedesk. They promised to fix it.

The problem occurs when trying to compile the Expert Advisor control panel. So far the solution is as follows: exclude the panel from the project. I have attached StrategyList1.mqh below. Try to replace the old StrategyList with it. It should help.

It still does not compile. Error: 'OnChartEvent' - function must have a body Agent.mq5 68 12


 
Kuzmich:

It still does not compile. Error: 'OnChartEvent' - function must have a body Agent.mq5 68 12

Comment out the OnChartEvent function in Agent.mq5. For now in the current version of the compiler we will have to do without the panel and events from the chart.

//+------------------------------------------------------------------+
//||
//+------------------------------------------------------------------+
/*void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam)
 {
 Manager.OnChartEvent(id,lparam,dparam,sparam);
 }*/
 

It worked :

MT5 Build 1301 from 15.04.16

P.S. hint where to dig: does not react to MM settings, that I do not specify, always trades only 1 lot, and also did not find anything about stops - loss, profit, trall, or it is not in the code?

 
netmstnet:

It worked :

MT5 Build 1301 from 15.04.16

P.S. hint where to dig: it does not react to MM settings that I do not specify, always trades only 1 lot, and also did not find anything about stops - loss, profit, trall, or it is not in the code?

Working with pending orders will be described in the fifth part of the article. In order to react to the MM, it is necessary to explicitly specify in the Expert Advisor's logic what MM to use. Trails are not supported at the level of the engine itself, so to use them, you have to explicitly code a trawl in the Expert Advisor itself.
 
For some reason in MT5 "Open" the panel in the tester does not work, but in MT5 MetaQuotes of the same bild 1375 the panel in the tester works, but all experts work only on the current instrument. Why? I can't find the file "Strategies.xml" in the attached archive.
 
Hello. Expert trading in a group is good, but there is a question of evaluating the results of each strategy, because a standard MT report will show the results for the whole portfolio. In principle, it is only necessary to parse all trades by magic number and evaluate financial results in this way. Do you have a solution in mind? Perhaps there is something already ready.