Работа завершена
Техническое задание
Now lets say the market goes in a down trend and the pending sell stop(0.2) is triggered x pips below current price which is also the market buy order price(0.1 lot). Immediately a new pending buy stop order is made for 0.4 lots(or whatever according to manual input) at same price of previous open buy market order. We can call this new pending buy stop order 2nd round in this example. Now either the market will continue in a down trend and close out basket of two trades once net TP of 5 pips is reached or the market can switch direction in a uptrend and trigger 2nd round pending buy stop order for 0.4 lots..immediately a new pending pending sell stop is order is generated at same price of current open sell order but now 0.8 lots(per manual input)…the price will continue to upward and basket will close after net TP of 5 pips is reached or back down to trigger pending sell order…each successive pending stop order will trigger opposite pending order but with a higher lot value . ALL pending buy stop orders and open buy orders should have the same price..and ALL pending sell stop orders and open sell orders should have the same price…only variation is lot sizes.
The current ea opens two opposite buy and stop pending orders x pip gaps away from each other/2 which is above and below current price. All I need is the second and consecutive baskets to open a market order immediately In the direction of current trend per last basket closed and the pending orders as described above with lot being amended until a net TP is reached.