I think I have got the code working now.
void CloseTicket() { if(OrderSelect(0,SELECT_BY_POS)==true) bool Order_Closing=OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),SLIPPAGE,clrNONE); Alert("Closing Order failed ",GetLastError()); }
Using OrdersTotal directly and/or no Magic number filtering on your
OrderSelect loop means your code is incompatible with every EA (including
itself on other charts and manual trading.)
whroeder1:
Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
Thank you, whroeder1
I don't really understand the importance of magic numbers, due to the fact I have never tried them yet (To do next).
I haven't really tried using OrdersTotal. I have been trying to use OrderType.
Swap = OrderSwap();
This one has me completely confused at the moment. I don't know how it is calculated on currently open orders.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello everyone,
I don't really understand order 1 and order 3 error messages.
and this, why is USDX-sep17 removed?
(solved) I was looking at the wrong log file, I was looking in MQL4 logs