Learning and writing together in MQL5 - page 2

 
Boroff :
Please post an example of this file... I searched the whole computer, I couldn't find any mqt files :(


It's not a problem to post it...

What I'm interested in is that these templates are used to create an initial text.

E.g. the above file.


As an alternative...

Put one more terminal.

 
kombat


Да выложить не проблема...

Интересует другое, то, что на базе этих шаблонов создаётся начальный текст.

Эксперты например вышеуказаный файл.


Как вариант...

Поставить ещё один терминал.


I also found only on the machine where the first builds were installed, the latest builds have no Templates directory.

And in old versions I have only Indicator.mqt

 
vdv2001 :


I also found only on the machine where the first builds were installed, there is no Templates directory in the latest builds.

And in older versions I only have Indicator.mqt


Maybe...

I've only installed twice, the very first available build and about five builds later the second.

Since then only an update...

 
kombat :


Possibly...

I've only installed twice, the very first build available and about five builds later the second.

Since then only an update...



And making corrections to these files has not changed anything for me :((

 

I warned you. :) Search and find it.

The files for 5 are in the middle of nowhere. I can't figure out how to deal with this thing.

For example, in my XP

\{\Documents and Settings\<user>Application Data\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Templates

So you need to know where to put the file to make it work.

Files:
expert.zip  1 kb
 

Well, there must be something misunderstood...


as an example added here so:

...
#extern_variables#

/*================================================\
тут пишем коментарий ...
\================================================*/

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
...

and when you create a new EA, you get the result...

//+------------------------------------------------------------------+
//|                                                     11001100.mq4 |
//|                      Copyright © 2006, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

/*================================================\
тут пишем коментарий ...
\================================================*/

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
...

maybe we forgot to save changes of the template?

or the name should be different, it should be the same as assigned by developers:

Expert.mqt, Indicator.mqt, etc...
 
sergeev :

I warned you. :) look for it and you will find it.

The files for 5 are in the middle of nowhere. I can't figure out how to deal with this thing.

For example in my XP

\Documents and Settings\<User>Application Data\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Templates


I've solved this problem by simply moving it from that folder to the terminal folder.

No problems so far... I have made it a long time ago, I do not remember all the details.

In general, I got into the habit with mt3, I multiply terminals by the budding method.

With the arrival of mt4 it's like two fingers, including updating...

;)))

Although I have to search for shred files in some specified path in users.

But it's nothing compared to the world revolution...

 

there are two questions about the MACD Sample

1. I don't understand presence of m_indicators object in CSampleExpert class. It is meaningless.

2. In the Trade.mqh.

Help for TRADE_ACTION_REMOVE indicates that only 2 parameters must be specified in MqlTradeRequest structure .

These are actually 1. TRADE_ACTION_REMOVE action itself and 2.

But in the example, all the other fields are zeroed.

m_request.action =TRADE_ACTION_REMOVE;
m_request.order =ticket;
m_request.symbol =NULL;
m_request.magic =0;
m_request.volume =0.0;
m_request.type =0;
m_request.price =0.0;
m_request.sl =0.0;
m_request.tp =0.0;
m_request.type_time =0;
m_request.expiration=0;

Question: does this need to be done always or can these fields not be zeroed?



Документация по MQL5: Торговые функции / OrderGetTicket
Документация по MQL5: Торговые функции / OrderGetTicket
  • www.mql5.com
Торговые функции / OrderGetTicket - Документация по MQL5
 
kombat :

Well, there must be something misunderstood...


as an example added here so:

and when you create a new EA, you get the result...

maybe we forgot to save changes of the template?

or the name should be different, it should be the same as assigned by developers:

Expert.mqt, Indicator.mqt, etc...


in the example the template for MT4 was changed... after reinstalling the terminal the templates did not appear...

they do not fit from mt4, i.e. there is no binding in the ini.

Can any of the developers tell me exactly what is used to create one object or another and where it's coming from?

 

"It seems quite simple to me...".

Use free MS Visual Studio (or any analogue) as the development environment.

Take MQL4(MQL5) as a library in one of the languages (VB, C++, C#). The last one,

in my opinion, is the most expressive one. Now you have a debugged and time-tested development environment

with all the necessary attributes. And the compiled code is most suitable for Windows.

According to the authors, everything will run 4-20 times faster in MQL5. Not noticed. A simple indicator

The Moving Average with some minor changes is much slower than in MQL4.

I have given my opinion, if it offends anyone - please excuse me.