Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
BTW it's supposed to be:
No, still same problem. It opens many ordes. How can I find last order open price, any idea?
Is the last open order:
OrderSelect(0,SELECT_BY_POS,MODE_TRADES);
no the last order is OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES);
OK, than maybe there is a problem. Thanks I'll try this.
i don't understand how it's going to help u it's the same as
for(cnt=OrdersTotal()-1;cnt>=0;cnt--){
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
Lets say I have BUY,1 BUY2, SELL1, SELL2 and SELL3 orders. BUY1 was opened first and SELL3 last. How can I find BUY2 open price. I try like this
Lets say I have BUY,1 BUY2, SELL1, SELL2 and SELL3 orders. BUY1 was opened first and SELL3 last. How can I find BUY2 open price. I try like this
no,
but this is gonna give u the last order
Print ("the last order is: ", lastbuy)no,
but this is gonna give u the last order