"Pass off" trade to another EA

 

Hello,

I am trying to find a way to modify an existing trade (started by an EA) that can be carried on, or modified by another EA apart from the EA that originated the trade. As it is not yet possible to modify the magic number, is there a work around that I can use to tag a give trade so that a completely different EA can monitor it seperately on a different chart and time frame.

Example: I have an EA the enters trades on a small time frame with a given criteria. If the market moves in my direction, I'd like to move the trade monitoring out to progressively larger and larger time frames. All this while simultaneously allowing the original EA to continue entering trades on the smaller time frame as the market conditions dictate.

Question: How can I program a seperate EA to look for and distiguish those trades that meet the longer time frame criteria and NOT interfer with those trades that are still generated on the shorter time frame...Likewise, how do I keep the EA on the shorter timeframe from interfering with the trades on the longer time frame?

The only thing I can think of is to somehow "mark" or "tag" those qualifying trades with some unique identifyer allowing the other EA to search for and find these trades. Is there a way to do this? It would be really nice if I could modify the magic number somehow.

Does anyone have any suggestions?

 

If I assume that it goes into long term due to larger profit or loss, perhaps "if TP > xxx pips" then long term trader takes over.

 
phy wrote >>

If I assume that it goes into long term due to larger profit or loss, perhaps "if TP > xxx pips" then long term trader takes over.

Yes the profit grows, however, when the EA selects a position to take action (close, modify stoploss, whatever) you have to tell it which position and how to find it. It has to be something that identifies a trades is being monitored on which time frame...

Example. EA1 initates a trade with 2 lots on a 5 min chart. At 20 pips it take profit with one lot. At this point looking at the 15 min chart the trade looks like it will be profitable for the next several hours but must survive a retracement (ie an exit signal) on the 5 min chart. If the EA can now switch to reading (monitoring) for an exit signal on the 15 min chart instead of the 5 min chart, and if does so, somehow it flags this trade with a marker so that EA2 running simultaneously on the 15 min chart will take over and select this trade for action when the exit signal on the 15 min chart appears, or pass it off again this time to the 1 hour chart...and so on and so forth...

Any ideas?

Reason: