[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 635

 
ikatsko:

Studied file operations in MQL. It turns out: files can only be opened in terminal_directory\experts\files (quote).

That is, from another terminal this file is not visible!!!

Why don't you want to run both EAs in the same terminal?

As a temporary solution, you may place a pending order far from the market with a small lot. And the second one to watch whether the order (for example on magic - for example with number 999 - start trade, with number 888 - stop)

 

Good afternoon!

I've written an EA, but it's not trading. I do a check at the very beginning:

if (Volume[0]>2)
   {
   Print("Алгоритм работает");
   //+---------------------------------------------------------------+
   //| блок формирования соответствующих векторов                    |
   //+---------------------------------------------------------------+
   ....

And it does not print the text in the log, which is in the printer. Hence I conclude that the condition fails, I think the solution is trivial)))))

 
ikatsko:

Studied file operations in MQL. It turns out:files can only be opened in terminal_directory\experts\files (quote).

So from another terminal this file is not visible!!!

https://www.mql5.com/ru/forum/138054

Windows allows you to map a virtual disk to one or more folders. This way you can merge the folders of several terminals.

 
ikatsko:
Well, it's very complicated here. :(
FileMapCreate(NULL, NameFileMap0, MemorySize); // Создаём отображение.
// hMapping = FileMapOpen(NameFileMap0); // Это, как ещё один вариант, если отображение уже открыто. В любом случае можно всегда открывать через "FileMapCreate()".
sComment = sComment + "Записываем число типа BOOL: (" + FileMapWriteBool(NameFileMap0, StartByte, bValue) + ")  " + bValue + "\n";
sComment = sComment + "Читаем число типа BOOL:" + FileMapReadBool(NameFileMap0, StartByte) + "\n";
Comment(sComment);
Everything is terribly complicated. I wonder, do you have MQL4 programs shorter than 3 lines? To make it simpler?
 

Hi

Dear programmers, help me solve a simple problem, who can

Given:

1. Vertical line 1 "Ver1"

(arbitrary name)

2. Vertical line 2 "Ver2"

(arbitrary name)

3. Horizontal line 1 "Hor1"

(arbitrary name)


Task:

Draw a trend line (segment)

that starts at Ver1 and ends at Ver2 with the price value Hor1

 
alsu:
Read about arrays in documentation. One way is to make a static array, i.e. an array with a predefined size: double a[55443]; another way is to make a dynamic array, i.e. declare an array of undefined size double a[], and then determine/calculate the size we need in the program code: ArrayResize(a,N)


Thank you very much! Everything fell into place with the ArrayResize function!

P.S. The whole problem turned out to be missing just one line!!!!!!

 
oleksaz:

Hi

Dear programmers, help me solve a simple problem, who can

Given:

1. Vertical line 1 "Ver1"

(arbitrary name)

get it OBJPROP_TIME1

2. Vertical line 2 "Ver2"

(arbitrary name)

get it OBJPROP_TIME1

3. Horizontal line 1 "Hor1"

(arbitrary name)

get it OBJPROP_PRICE1

Task:

Draw a trend line (segment)

which begins in Ver1 and ends in Ver2 with the price value Hor1


construct a trend line object based on the received time and price data
 
orb:

Good afternoon!

I've written an EA, but it's not trading. I do a check at the very beginning:

And it does not print the text in the log, which is in the printer. Hence I conclude that the condition fails, I think the solution is trivial)))))



Check which testing model, if at opening prices, the condition will fail.
 
Can you tell me what kind of error occurs during optimisation, it doesn't complete. What does it have to do with it. A picture is attached.
 
orb:
Can you tell me what kind of error occurs during optimisation, it doesn't complete. What does it have to do with it. I am attaching a picture.


This is not an error - it is a message that the min. balance has been reached - i.e. the account is drained - the run is completed and a new one is started with another set of input parameters - see checkboxes and set limit values in the Optimisation tab of the tester:

Reason: