Forum

MQL5 - how to modify limit order

my code just modify open order, It can not modify limit order. how to modify limit order? for ( int i = ( int ) PositionsTotal (); i >= 0 ; i--) { ulong positionTicket = PositionGetTicket (i); if (positionTicket == 0 ) continue ; if ( PositionSelectByTicket

Convert function average price MQL4 to MQL5

My code below calculate average price in MQL4 and it run ok on mt4, How to re-write it in MQL5. void getAveragePrice() { double sum_lot_b = 0 ; double sum_price_b = 0 ; double sum_profit_b = 0 ; double ave_price_b = 0 ; double sum_lot_s = 0 ; double sum_price_s = 0 ; double