EA within an EA

 

Hi

Is it possible to call an EA inside an EA?

Thanks

 

Two EA's can interact with each other by using Global variables.

CodersGuru has a good article about global variables here: http://www.metatrader.info/node/93

Is that what you meant?

Chris

 

You can't have 2 EA's running on the same chart, so running both on 2 charts and as is suggested, passing a flag in global variables to indicate which one is in charge is probably your best route.... I think it will be frought with problems though in particularly for persistance. I would suggest you would be better incorporating the code from the 2 into 1 EA and that way, you will never "lose" your flag of which one is in control.

V

 

Hi

Thanks. What I meant is to write my EA and call an already working EA to perform a certain task in my EA. Like calling a custom indicator.

Thanks

 
johanmalan:

Hi

Thanks. What I meant is to write my EA and call an already working EA to perform a certain task in my EA. Like calling a custom indicator.

Thanks

Then global variables to pass a "go" or "stop" flag seems like the only way.

V