"Real" global variable

 

Hi all

I've three EA implemented. All these EA's have to read a "real" global variable to set some parameters. With "real" global variable I mean one value which is accessible (readable) from every running EA (e.g. my three EA's).

I've implemented this with a file. The file have the value and ever EA access to the same file. Every EA have to read that value when a new bar appears (in 1 Minute chart). That meand every minutes a OPEN and CLOSE FILE action. My solution works fine, but is there any better way to do that?

Best Regards

fx_ta

 

In chapter about paralelism you can find:

Data exchange

We can transmit the information between the MM and CM using any of the 3 ways:

  1. global variables of the terminal;
  2. files;
  3. Indicator buffers.

 

What i would like to know, are there any plans  for introducing multi-threading?
So that one can run different threads from EA? 

 
graziani:

In chapter about paralelism you can find:

Data exchange

We can transmit the information between the MM and CM using any of the 3 ways:

  1. global variables of the terminal;
  2. files;
  3. Indicator buffers.

 

What i would like to know, are there any plans  for introducing multi-threading?
So that one can run different threads from EA? 

Hi

Thanks lot for your answer. I tried point 1 few weeks ago without success. I think I need to do that again! Point 3 I didn't know.

Thanks lot.

 Best Regards,

 FX_TA 

 
graziani:

In chapter about paralelism you can find:

Data exchange

We can transmit the information between the MM and CM using any of the 3 ways:

  1. global variables of the terminal;
  2. files;
  3. Indicator buffers.

 

What i would like to know, are there any plans  for introducing multi-threading?
So that one can run different threads from EA? 

Thanks for your answer. It really help me. Keep it up
 
fx_ta:

 

Thanks lot for your answer. I tried point 1 few weeks ago without success. I think I need to do that again! Point 3 I didn't know.

 

It is working that way, i was using this method from the earliest days in MT4 for synchronisation.

Regarding multithreading, phi.nuts, can you say something?

 
graziani:

 

It is working that way, i was using this method from the earliest days in MT4 for synchronisation.

Regarding multithreading, phi.nuts, can you say something?

I can't say much :(. There's example in the link you gave and it should MetaQuotes who should explain more about multi threading, coz they're the one who create mql5 language and we're not involved in all of these. 

:D 

 
That's a trick, not true multitasking.