工作已完成
指定
I use 2 EAs that trade together in my account.
The EA1 open positions from 00:00:01 (HR:MN:SC) to 01:00:00 on many currencies with magic numbers from 1001 to 1015 opening only 1 (one) position per currency and per magic number.
The EA2 trades only on one currency with magic number 7777.
I want the desired Basket Profit EA to deal only with EA1's trades, only with the trades that have magic numbers from 1001 to 1015 (seperated with comas).
I want Basket Profit EA to be able to close EA1's trades on various profit stages and at the end (03:00:00) to do loss control by closing all remaining open positions at any price, spread or slippage.
So, the 4 stages that I want the Basket Profit EA to have are the following:
Stage1: (from 00:00:01 to 01:50:00) the Basket Profit EA must close all EA1's open positions (together as a basket) when the total combined profit of all (magic numbers 1001 to 1015) closed and open positions minus commissions is above a certain profit level (for example 40). I mean that if some EA1's positions have already closed in profit or loss, their P/L to be calculated together with the floating P/L of still open positions, minus commissions.
Stage2: (from 01:50:01 to 02:20:00) the Basket Profit EA must close all EA1's still open positions (together as a basket) when the total combined profit of all minus commissions (magic numbers 1001 to 1015) is above a certain profit level (for example 10).
Stage3: (from 02:20:01 to 02:59:59) the Basket Profit EA must close all EA1's still open positions (together as a basket) when the total combined profit of all minus commissions (magic numbers 1001 to 1015) is above a certain profit level (for example 1).
Stage4: at 03:00:00 the Basket Profit EA must close all EA1's remaining open positions at any price, spread or slippage, making a loss control. All EA's still open positions (magic numbers 1001 to 1015) must close at this time, at any cost.
The Basket Profit EA must work on MQL5 VPS and must reset all P/L data on a new daily bar.
I don't want to have date settings, but only HOUR:MINUTES:SECONDS settings. I load my EAs every day before next (00:00:01 - 03:00:00) trading session begins.
The Basket Profit EA must not interfere with EA2's 7777 magic number trades at any point.