How to read all of the current positions in my trading account, using MQL4 , not MQL5 ?
Thanks very much!
to view all current ongoing positions in your MT4 terminal select tab Trade using Terminal Ctrl+T
How to read all of the current positions in my trading account, using MQL4 , not MQL5 ?
Thanks very much!
Thanks for your reply, but I mean using programming language ( MQL4 ) in MetaEditor, such as PositionGetDouble() in MQL5.
to view all current ongoing positions in your MT4 terminal select tab Trade using Terminal Ctrl+T
Thanks for your reply, but I mean using programming language ( MQL4 ) in MetaEditor, such as PositionGetDouble() in MQL5.
Sorry...miss understood ;)
It's OK... I didn't make it clear :)
Sorry...miss understood ;)
Thank you. I’ll try it first. :)
Use OrdersTotal and OrderSelect functions to iterate through all positions. Check the type of orders using the OrderType function.
-
Why did you post your MT4
question in the
Root / MT5 General section instead of the MQL4 section,
(bottom of the
Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - Do you really want to read all positions? Or only the EAs positions? Or only the EAs positions on the current chart
symbol?
Using OrdersTotal (or OrdersHistoryTotal) 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.)
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum
MagicNumber: "Magic" Identifier of the Order - MQL4 Articles
Thanks for your reply. Its my first question in the forum. When I link to forum of www.mql4.com, it tends to mql5 forum, so...
I just wanna read
the current holding positions, not history, not pending orders.
Ehsan
Tarakemeh (#4)'s answer is great. Using OrdersTotal, OrderSelect function, OrderType could solve it.
- Why did you post your MT4 question in the Root / MT5 General
section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - Do you really want to read all positions? Or only the EAs positions? Or only the EAs positions on the current chart symbol?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How to read all of the current positions in my trading account, using MQL4 , not MQL5 ?
Thanks very much!