Forum

How to reduce the TP in an open position?

I want to lower the TP of my first opened position by 10 pips, how would you do this? #include <Trade\Trade.mqh> CTrade trade; void lowerTargetProfitOfOldestPosition() { if ( PositionsTotal () == 0 ) { return ; } int ticket = PositionGetTicket ( 0 ); double priceTP =

how do I modify open positions so TP is lowest for highest open price?

Hello, I want to modify all my open positions so that the TP (selling price) of all my open orders is sorted in the opposite order as the opening price . example of how my open positions are now Ticket Number Opening Price Target Profit 1 4 4 2 3 5 3 2 3 4 1 2 How I want them sorted Ticket Number