Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1158

 
Александр:

Please advise where the error lies.

Code:

Function is being evaluated

Try putting your cursor on iBars and clicking F1, and read what it says
 
Alekseu Fedotov:
Try putting your cursor on iBars and clicking F1, and read what it says
Got it. Everything works. I am describing the iBars function here, whereas it is already described in
MQL4_to_MQL5.mqh
 

Hello,

I have an indicator that saves data to a file, how to make several indicators in one chart write data to different files for reading from them if reinitialization happens ?

The indicator is in the main window, if it is in a separate window, I would be able to attach the file name to the window number. Surely there must be some simple way,

Thanks !

 
Vitaliy Sendyaev:

Hello,

I have an indicator that saves data to a file, how to make several indicators in one chart write data to different files for reading from them if reinitialization happens ?

The indicator is in the main window, if it is in a separate window, I would be able to attach the file name to the window number. Surely there must be some simple way,

Thanks !

input string prefix = "что-то";

And that's something to put in the file name.

 
KhuKhu:

Hello.

Could you help correct two errors.

1. 1 order should open on one bar (now opens randomly)

2. To correctly open 1 order with a set volume (now it is opening with different volumes)

The idea is that this EA should open a deal of 10% of the deposit on one bar (I had hoped so), but it is not happening.

But it does not happen.

1. Free funds are

AccountEquity();


2. this entry

if (! NumberOfBarOpenLastPos(NULL,mper[tf_bar],OP_BUY, magic) ==0) 

should probably look like this:

if (NumberOfBarOpenLastPos(NULL,mper[tf_bar],OP_BUY, magic)!=0) 
 
Alexey Viktorov:

And this is something to put in the file name.


It is necessary to change the file name every time by hand, surely there is a way out, to generate the name automatically ?

 
Vitaliy Sendyaev:

You have to change the name of the file manually every time, surely there is a way to generate the name automatically?

Why every time? Only when the next indicator is loaded on the chart.

 
Vitaliy Sendyaev:

Hello,

I have an indicator that saves data to a file, how to make several indicators in one chart write data to different files for reading from them if reinitialization happens ?

The indicator is in the main window, if it is in a separate window, I would be able to attach the file name to the window number. Surely there must be some simple way,

Thanks !

In OnInit I form File Name = Symbol Name + TimeFrame
 
STARIJ:
I form File name = Symbol name + Timeframe in OnInit

As far as I understand, it needs to run several copies of the indicator from one chart, so that they write to different files.

 
Vitaliy Sendyaev: I have an indicator that saves data to a file, how to make several indicators in one chart write data to different files for reading from them if re-initialization happens?

You can create copies of indicators with different names. File name = name of the indicator Automatically! You can use random numbers to form the name. But then how do you find whose file is whose?

Reason: