Modifying Trades

 

Has anyone had the situation where a trade is placed with a TP and later a second trade is placed, of the same type, also with a TP. Because of FIFO both trades have the same TP. The problem is that the TP of the second trade pulls back the TP of the first trade causing it to become at a loss or very little gain. Is there a way to use OrderModify() to set the TP of two same trades to the highest value, of the two, when they are BUY orders and lowest of the two, when SELL?

 

08:06:37 '925198': instant order sell 1.00 EURUSD at 1.45395 sl: 0.00000 tp: 1.45376

08:06:37 '925198': request was accepted by server

08:06:38 '925198': request in process

08:06:38 '925198': order was opened : #9942185 sell 1.00 EURUSD at 1.45395 sl: 0.00000 tp: 1.45376

08:06:40 '925198': instant order sell 1.00 EURUSD at 1.45398 sl: 0.00000 tp: 1.45379

08:06:40 '925198': request was accepted by server

08:06:40 '925198': request in process

08:06:40 '925198': order was opened : #9942187 sell 1.00 EURUSD at 1.45398 sl: 0.00000 tp: 1.45379

Because of FIFO, the TP of the first SELL was changed to 1.45379 and I had to manually change it back.

08:08:18 '925198': modify order #9942185 sell 1.00 EURUSD at 1.45395 sl: 0.00000 tp: 1.45379 -> sl: 0.00000 tp: 1.45376

08:08:18 '925198': request was accepted by server

08:08:18 '925198': request in process

When I change the TP of a trade ( doesn't matter which one I change ) the TP of both trades are made the same.

What I need is to be able to change the TP of both trades to the lowest value for a SELL, and the highest value, for a BUY.

Wasn't sure if OrderModify() would be the best way to accomplish this or if there was an easier way.

 

My solution may not be very helpful, but I simply don't place multiple trades on the same account. I know that many strategies rely on this and other things that have now been 'outlawed', but in a sense it just takes us back to the days before modern electronic systems when such practices as we've become accustomed to just were'nt possible.

Before hedging and multiple trades were allowed people made scads of money just trading one trade at a time. Basic strategies such as trend lines, S/R and pivot points are still just as effective today as they were then.

The winds have changed, and whether we like it or not (I don't) we must find ways to be successful in the current environment. A long-term strategy requires the ability to adjust to changes in factors that are just beyond our control.

Reason: