Download MetaTrader 5
To add comments, please log in or register
Have you published a program in the Market? Place it in your blog as well - the widget will help!
MetaQuotes Software Corp.
Moderator
177091
MetaQuotes Software Corp. 2007.10.15 10:21 

New article Object Approach in MQL has been published:

This article will be interesting first of all for programmers both beginners and professionals working in MQL environment. Also it would be useful if this article were read by MQL environment developers and ideologists, because questions that are analyzed here may become projects for future implementation of MetaTrader and MQL.

One of the disadvantages of MQL, in my programmer opinion, is the absence of the object approach in constructing the model of the trading system. MQL developers offer us two ways out: using the calling of external functions or using the order parameter MAGIC for the identification of the order belonging.

Actually, if only one system operates on one account, we do not need identification. But when we have the program option of attaching to one account several automated trading systems, then we cannot do without MAGIC. Even when calling external functions, we need to determine them. Of course, we may build an array OrderTicket and identify the array belonging only to one trading system, but as we know in some brokerage companies the order ticket changes at swap (actually, one is closed, another one is opened). That is why we cannot do without using MAGIC.

So, while developers are busy improving MQL language making it more flexible, let us try to implement already now the object approach in building a trading model.

This is a trading system in accordance with my object model. Of course, it is not universal, but by now I do not see other approaches.

So, let us analyze this model.

A). Signal System (SS).

Object of this module process and interpret incoming quotes. Usually the "object" of the signal system is a set of indicators, for example, moving averages. As a result of processing quotes and indicator values, "the object" (or semaphore) produces signals to enter/exit, or order modification etc.

The semaphore forms its signal and sends it to another object from the module Entry/Exit (EE).

Setting the semaphore in MQL is rather easy.

Author: o_O

LesioS
76
LesioS 2007.10.23 14:19  

"And once again I would like to ask MQL developers to widen the options of the language. And as an example, here is a variant of implementing object classes written in the language C++."

I also hope that MQL5 will have some of this features. If events occur also....

MQL4 Comments
16309
MQL4 Comments 2008.01.06 17:39  
Can you attach the LaGuerre.mq4? I download the LaGuerre indicator from this site. It get a error "'LaGuerre' - function is not defined ".
MQL4 Comments
16309
MQL4 Comments 2008.03.01 17:02  
I presume that the .zip file here contains the Laquerre file.  However, I can't download it.  A square symbol appears next to the file.  Perhaps this is an indication that the file is protected from downloading.  Any help in resolving this will be appreciated.
庄继军
10
庄继军 2008.06.08 03:06  
Laguerre.mq4    ??????????????????????????
o_O
Moderator
23261
o_O 2008.06.24 10:58  
Laguerre.mq4   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/
To add comments, please log in or register