Ea that stops other ea if spread is too high

 
I need an ea that stops other ea if spread is too high.
 
Daniel Burac:
I need an ea that stops other ea if spread is too high.
other EA should be smart enough to stop itself if spread is high :)
or you need to use DLLs afaik
 
Code2219 or probably 2319:
other EA should be smart enough to stop itself if spread is high :)
or you need to use DLLs afaik

i dont know what is that

 
Daniel Burac:

i dont know what is that

In other Words.....The main expert advisor should already have a spreadfilter :)
 
Daniel Burac:

i dont know what is that

He's saying that your first EA should already have that functionality built-in. It sounds like you don't have that.

So, you could use API calls from a second EA to enable/disable the first EA.

This thread may give you more information.

https://www.mql5.com/en/forum/113277

This thread (different forum) stuffs the keyboard buffer.

https://www.tradingsystemforex.com/mql-programming/1166-disable-ea-form-ea-or-script.html

 
Anthony Garot:

He's saying that your first EA should already have that functionality built-in. It sounds like you don't have that.

So, you could use API calls from a second EA to enable/disable the first EA.

This thread may give you more information.

https://www.mql5.com/en/forum/113277

This thread (different forum) stuffs the keyboard buffer.

https://www.tradingsystemforex.com/mql-programming/1166-disable-ea-form-ea-or-script.html

Maybe those links are helpful for someone who know programming but i know only about the Magic Number. Someone for sure does have a "trades manager" or something like that.

 

EA's usually don't control each other.

If you want an EA that stops when spread becomes to high then code it into the EA itself, not in another EA to control the first one.

 

Have an EA that can apply a template on another chart (with your EA on it)  that dissables EA trading on that chart when spread is high.

After spread changes to normal it applies template with trading allowed.

 
Michalis Phylactou:

Have an EA that can apply a template on another chart (with your EA on it)  that dissables EA trading on that chart when spread is high.

After spread changes to normal it applies template with trading allowed.

This sounds interesting.

However, I don't see a way to save a "disable AutoTrading" attribute to a template.

Can you break down your solution for me?

 
Anthony Garot:

This sounds interesting.

However, I don't see a way to save a "disable AutoTrading" attribute to a template.

Can you break down your solution for me?

Use the "flags". Allow live trading is bit 2.

This solution could however "disturb" the controlled EA and flood the output log, depending of how it's coded.

 
// Deletes the Expert Advisor form the appropriate chart
bool EXPERT::Remove( const long Chart_ID = 0 );
Expert
Expert
  • www.mql5.com
All other files on this page provide examples/scenarios of library application; they are not needed for the operation of the library. Features Example The library use examples/scenarios are attached to the description. ExpertsRemove.mq5 ExpertsReopen.mq5 ChartsClose.mq5 ExpertLoader_Example.mq5 ExpertsChange_Example.mq5 The above examples...