Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
Hello,
I have an existing robot that takes trades towards market direction using some parameters to show gaps between direction, expected direction, lot sizes when market goes according to direction, and if market goes against direction.
However the robot doesn’t consider all trades and takes each trade individually to consider the TP and SL of each position.
As a result, I want an adjustment in which the EA will consider all the BUY bids together and all the SELL bids together in such a way that every time a SELL bid is in profit, eg when prices goes downwards, and prices wants to revert upwards, the robot will identify the first bid of the SELL direction and also the LAST bid of the SELL direction and then use it to speculate the SL position. This will mean that once the SL position is met, it will close all the SELL Bids available at the time and by this time the market would have started moving UPWARDS to activate BUY bids. This will also happen to the BUY bids if Prices are about to change direction downwards as it will calculate the Highest BUY and Lowest BUY and use it to calculate the SL for outstanding bids at the time.
As you can see from the first 3 pictures, the individual Take Profit and Stop Loss are working for each bid. But I want it to consider the whole bids at each movement of same direction.
The fourth picture of CHFJPY shows the RED lines as SELL and BLUE as BUY bids. You can notie the BLUE lines above and the SELL lines below, apart from the TP and SL lines. So basically what it meant was that the BUY bids at the top activated and are now in Losses, but with the adjustment REQUIRED, the BUY bids would have been closed and now would remain only NEW SELL BIDS. Also the lower SELL bids would have been closed earlier when price was going Higher and activating Buy bids.
Same thing with GBPJPY, the market moved from a LOW trend and now going HIGHER, so all SELL bids below the current price of 158.459 should have been closed using the Highest and Lowest outstanding SELL to identify the SL position, while ALL the BUY bids at the top of current price should have been closed earlier as well when market was reverting downwards and should only have the BUY bids from current price downwards as outstanding currently.
Same condition with EURAUD as well as the new trend is falling downwards, so all the BUY bids at the Top should have been closed together and only SELL Bids up to the current price of 1.49944 should have been outstanding, while all SELL bids below the current price should have been closed previously.
I will provide the source document for the EA to the selected programmer and please only those immediately available and serious should apply as I plan to get this done quickly and if successful, the person may be helping to create the MT4 Version of the same robot as a new Project.
Thanks