Please help with OrderOpenPrice()
Please, your help, I need to get the OrderOpenPrice() from the first order ( from the openbuy() funtion ) into the third order ( to the openbuystop function ) and the testing is stopping at the third order, it seems not taking the OrderOpenPrice from the firts order. I thank you any help.
You need to make sure you are selecting the correct Order . . . how can you identify the correct order ?
Hi Raptor, trying to select it with:
int x = OrdersTotal()-1; OrderSelect(x, SELECT_BY_POS, MODE_TRADES);
Hi Raptor, trying to select it with:
but, when testing, the EA stops running when it is suposed to open the third trade with the buystop function.
But is that the correct Order ? how do you know it is ? how can you verify it is the correct Order in the code ?
by defining the x variable, I think I can get the order selection, or is there another way to ensure that the ORDEROPENPRICE that I need, be choosen ????? I really dont know how to get it.
Can you guarantee that the Order in the last position is the one you need ? if you can't then you need to make sure you have selected the correct one, test by Type, position size, symbol, Magic Number, OrderOpenTime() or whatever you can use to confirm it's the right one . . .
Please, your help, I need to get the OrderOpenPrice() from the first order ( from the openbuy() funtion ) into the third order ( to the openbuystop function ) and the testing is stopping at the third order, it seems not taking the OrderOpenPrice from the firts order. I thank you any help.