Coding an EA to start using another EA
-
Hi there
I'm trying to control the opening / closing of trades made by an EA by using a "master EA", depending on the close of a candle.
Ex.
- First EA running on a EU chart => opening & closing trades
- Second EA running on another EU chart:
- If D1 candle closes above price xxx then (1) close all EU trades and (2) turn EA off
- Then when D1 candle closes back below price xxx, turn EA back on.
The first step seems partially OK to me: I think I can work on an EA that will close all EU trades based on one condition, but I don't know how to turn EA off.
The second step, resuming EA activity, is trickier in my view and I do not even know if that is possible, and I'd love to have your suggestions.
A dirty way to do that would be, instead of "turning off EA" and then "resuming EA activity", to kill all trades that open after the D1 candle closes above the level.
this would make the job, but spread costs would be significant...thanks for your help!
-
@e-so Don't think you can stop and restart a EA without doing it manually, you can control another EA's trades with magic number, or by selecting all manually opened and automatic
-
yeah I thought so, does not matter
thanks anyway for your help