Hi programmers, ive been trying to figure out a way of getting the number of open positions for a specific symbol in an ea for example the number of open positions in USDCHF, does anyone have an idea i'd appreciate any idea on how to start
- Get open positions tickets based on the symbol
- Volume in DOM of open position price
- How to number open trades on chart
Here are all position listed: https://www.mql5.com/en/docs/function_indices.
Search (Ctrl-F) for "open posit" and you'll find PositionsTotal()
Documentation on MQL5: List of MQL5 Functions
- www.mql5.com
List of MQL5 Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Start with a query for number of open positions, then make a for loop that goes through every position and compares the Symbol with the one you want. Go to documentation and look for functions list. Look for functions that start with Position.
Use the search function to find keywords of your requirements in the documentation and set everything up. When you get stuck ask again.
Edwin Tempah:
Hi programmers, ive been trying to figure out a way of getting the number of open positions for a specific symbol in an ea for example the number of open positions in USDCHF, does anyone have an idea i'd appreciate any idea on how to start
Hi programmers, ive been trying to figure out a way of getting the number of open positions for a specific symbol in an ea for example the number of open positions in USDCHF, does anyone have an idea i'd appreciate any idea on how to start
How to start with MQL5
- 2020.12.19
- www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
I managed to get the best way of doing it in mql5, so it goes
***
The ea stores the magic number for the symbol it is attached to.
Edwin Tempah # :
I managed to get the best way of doing it in mql5, so it goes
***
The ea stores the magic number for the symbol it is attached to.
1. Please do not confuse two concepts: "Pending Order" and "Position"
2. Please insert the code correctly: when editing a message, press the button and paste your code into the pop-up window
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