Discussion of article "The Prototype of Trade Robot"

 

New article The Prototype of Trade Robot is published:

This article summarizes and systematizes the principles of creating algorithms and elements of trading systems. The article considers designing of expert algorithm. As an example the CExpertAdvisor class is considered, which can be used for quick and easy development of trading systems.

Author: Алексей Сергеев

 

Oh finally a good article!

I've abandoned forex programming for a couple of years. And now I want to put a robot on the championship. And I broke my head trying to program in mql5. And from unused to it seems to me so difficult to understand unlike mql4, just horror.

:-(

Regards, Andrew.

 
LuckyFish:

Oh finally a good article!


Yes, but this template is not suitable for multi-currency and/or timed EAs.
 

SUPPORT!)

Yes, but this template is not suitable for multi-currency and/or timed EAs.

 

thanks !!!

and the developers - 3 months earlier such an article ?

 
and how is timed operation different from tick-by-tick operation?
[Deleted]  
sergeev:
and how does working by timer differ from working by ticks?

You should not mix flies with cutlets, you need both timer and ticks to work (the main thing is to use them correctly).

The timer is needed to perform periodic actions, and it is also desirable to execute part of the multicurrency code there (the second is recommended, but not necessary).

PS

Timer is also interesting to use for tracking the terminal state. For example, if there is a connection...

 
Good article. Thanks!
 

Really great, people still stuck on MT4 should see "the bigger picture" presented in this article.

This article's author should earn double the pay for all the hard work. :) 

 

Probably one of the best articles so far. The funny thing is that I planned to create such a prototype for a frequent use so it seems that now I will have a much easier task. 

Thanks to the author!

 
It's procedural, but it's a good start. You can hide a lot of things using OOP. With a minimally visible interface in each new Expert Advisor. Put the strategy in a separate class, for example. Strategy settings - properties of the CStrategy object, initiate in the EA constructor. Multicurrency - initiate the list of strategy objects. Each strategy on its own symbol. And little things, instead of m_trade.ResultOrder() you can immediately use m_trade.ResultDeal() without unnecessary loops through all orders in the additional function GetDealByOrder().
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов - Документация по MQL5