How to find the number of open positions with MQL4?
Read:
Simple Expert Advisor - Simple Programs in MQL4 - MQL4 Tutorial
- book.mql4.com
- Total?
Perhaps you should read the manual. OrdersTotal - Trade Functions - MQL4 Reference
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up. -
Current chart and by the EA?
Do an OrderSelect loop and filter out the others and count. Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017)
In the documentation there are plenty of examples - to get all orders from the whole account use OrdersTotal().
If you want to count only trades from chosen symbol or strategy (defined by predefined magic number) – just go in loop for all trades and count only those with proper OrderSymbol or OrderMagicNumber
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use