Forum

Partial OrderClose()

Hi All, In MQL4 language, if we use OrderClose() function to close just a part of the lots of the entire position, the EA will close the actual position ticket(number), and create another position ticket(number) with the remaining lots. OrderClose(OrderTicket(),(OrderLots()/ 2 ),Bid, 3 ,Pink); I

IF comparison not working

Hi, I am developing a function that is driving me crazy, a simple: if ( temp1 == temp2 ) seems not to be working. The Original function is: int encontraIOposto2( int direcao, double valorFecho) { for (i= 0 ;i< 150 ;i++) { if ( direcao == 1 && valorFecho == longGridPositions[i] ) return (