Discussion of article "Universal Expert Advisor: Integration with Standard MetaTrader Modules of Signals (Part 7)"
Vasily, interesting as always. First of all, from the programming point of view... although what else can you expect on an MQL forum....
A small remark :-)))
Inheritance is usually drawn from bottom to top. Approximately like this:
Vasily, interesting as always. First of all, from the programming point of view... although what else can you expect on an MQL forum....
A small remark :-)))
Inheritance is usually drawn from bottom to top. That's about right:
I wrote something similar in mql4 with one file and without using third-party libraries, so that to generate a signal user can build a free tree of relationships between 70 elements for ten any custom indicators, to collect the result of the built conditions from such a garden is a lot of fun, but it turned out something really universal
I wrote something similar in mql4 with one file and without using third-party libraries, so that to generate a signal user can build a free tree of relationships between 70 elements for ten any custom indicators, to collect the result of the built conditions from such a garden is a lot of fun, but it turned out something really universal.
Question for the public: does anyone use the MetaTrader signal system at all? And who uses signal classes in their Expert Advisors programming?
Я. I always do this:
- write an indicator
- I make a signal module on the basis of the indicator
- When building an Expert Advisor, I connect the necessary module of signals.
Я. I always do:
- write an indicator
- I make a signal module based on the indicator
- When building an Expert Advisor, I connect the necessary module of signals.
A really thorough approach. Yes, it has its advantages.
In general, many developers have already written their own signal modules. Why not create a centralised base of such modules? Anyone can share his module and post it in the database. Grail of course not to water, but the benefits will be obvious for all, we will not have to reinvent the wheel.
When initialising the indicator signals:
//+------------------------------------------------------------------+ //| Initialisation of the CSignalMacd signal module | //+------------------------------------------------------------------+ COnSignal_RSI_AC::COnSignal_RSI_AC(void) { MqlSignalParams params; params.every_tick = false; params.magic = 32910; params.point = 10.0; params.symbol = Symbol(); params.period = Period(); params.usage_pattern = 2; params.signal_type = SIGNAL_AC; CSignalAC* ac = m_adapter_ac.CreateSignal(params); params.usage_pattern = 1; params.magic = 32911; params.signal_type = SIGNAL_RSI; CSignalRSI* rsi = m_adapter_rsi.CreateSignal(params); rsi.PeriodRSI(RSI_Period); }one signal module (adapter) is transmitted one Magik (32910), the second one is transmitted the second one (32911). I.e. one Magik will be used to open positions and another one to close them? Or do I understand something wrong?
When initialising the indicator signals:
one signal module (adapter) is transmitted one Magik (32910), the second one is transmitted the second one (32911). I.e. one Magik will be used to open positions and another one to close them? Or am I misunderstanding something?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Universal Expert Advisor: Integration with Standard MetaTrader Modules of Signals (Part 7) has been published:
This part of the article describes the possibilities of the CStrategy engine integration with the signal modules included into the standard library in MetaTrader. The article describes how to work with signals, as well as how to create custom strategies on their basis.
The below diagram shows the general scheme of vertical inheritance of classes used in the process of automatic generation of strategies:
Fig. 1. Inheritance of standard classes of the strategy generator
The figure only shows basic and some derived classes. The scheme does not feature all indicators inherited from CIndicators. Separate trailing, money management and signal modules are not included into the scheme. Instead, only the basic relationships are outlined. One of the featured groups is of interest to us: the signal classes CExpertSignal and its child classes. In Figure 1, the group is highlighted by a green dotted line.
Author: Vasiliy Sokolov