Questions from a "dummy" - page 136

 

Can you tell me how to make an analogue in mq5?

for(i=0;i<limit;i++) 
{
  EnvUp2[i]=iEnvelopesOnArray(Last,0,Channel,MODE_SMA,0,Channel_Dev,MODE_UPPER,i);
  EnvUp1[i]=iEnvelopesOnArray(Last,0,Channel,MODE_SMA,0,Channel_Dev/2,MODE_UPPER,i);
  EnvDn1[i]=iEnvelopesOnArray(Last,0,Channel,MODE_SMA,0,Channel_Dev/2,MODE_LOWER,i);
  EnvDn2[i]=iEnvelopesOnArray(Last,0,Channel,MODE_SMA,0,Channel_Dev,MODE_LOWER,i);
}

Probably need to use IncEnvelopesOnArray, but how to do it?
If possible, a simple example with mq4 - mq5 analogy.

 
Vitya:

Can you tell me how to make an analogue in mq5?

Probably need to use IncEnvelopesOnArray, but how to do it?
If possible, a simple example with mq4 - mq5 analogy.

That's it, I have understood it.
Integer gets the credit.
 
Dima_S:
If you click on the ORDER_FILLING_AON link, you'll see that the name has just changed.
Many thanks!
 

Hello!

Could you suggest a code for an EA to close a position after 5-6 hours. Or give me a link.

Many thanks in advance!

 

The programme uses the file to read the data and analyse it. It makes sense to write something like this in the options:

input string FileName = "FileName.csv";

and then use the file name to access it.

So it's inconvenient to work this way, if I have many files with data, and I can't know the file names beforehand - it's really hard to change them by hand.

I've thought of this: write a function that returns value like string, something like this:

string GetNameOfFile()
{
string name="";

//-------------------------
//... тут реализован функционал диалогового окна, позволяющего пользователю выбрать файл из предложенного списка файлов,
//... которые есть в данный момент в папке ....\MT5\MQL5\Files\
//-------------------------

return(name);
}

I don't know where to start.

Документация по MQL5: Основы языка / Типы данных / Тип string
Документация по MQL5: Основы языка / Типы данных / Тип string
  • www.mql5.com
Основы языка / Типы данных / Тип string - Документация по MQL5
 
joo:

I don't know where to start.

If you use MQL, you take the file list from Files\\\ with FileFind

Well, you can draw the interface however you want.

 
joo:

The programme uses the file to read the data and analyse it. It makes sense to write something like this in the options:

and then use the file name to access it.

This is inconvenient when there are a lot of files with data and you can't know the file names beforehand, it's a pain in the ass to change them by hand.

Thought of such a thing: write a function that returns the value of type string, something like this:

I don't know where to start.

First, using FileFindFirst() and FileFindNext(), find names of all existing files and put these names into an array of type string. Then, we use the dialog window tools to display the values of this array to the user. Unfortunately, I haven't worked with dialog windows, so I'm not sure how to output the string-array for selecting the file name.
 

sergeev:

и

Yedelkin:

..Then, using the tools to create a dialog box, output the values of this array to the user. Unfortunately, I haven't worked with dialog boxes, so I can't tell you how to output a string-array for selecting a file name.

That's exactly my difficulty.

After all, you need to display all file names in a list and be able to select from this list with a mouse click.

 
joo:

This is where I have a problem.

You need to list all the file names and be able to select from that list with a click of the mouse.

see the standard Controls expert
 
sergeev:
check out the standard Controls expert
Thank you, that sounds like just the thing.