calculating total lot size (volume) of hedged positions and getting TP and SL of the first (oldest bu still running) position...
Hi. I am coding my first(i know basics) MQL5 project, it is a hedging expert advisor that will open multi directional trades(sells and buys)... i am stuck and would appreciate your assistance, I need to sum the total lot size(volume) of running positions and display it... the second problem is, i need to get TP and SL of the first(oldest) opened position (in multiple opened positions) and maybe store them in variables, so i can use them in other trades. Thank you.
- Close By - Trade - MetaTrader 5 for Android
- Close By - Trade - MetaTrader 5 for iPhone
- Getting Started
![How to start with MQL5 How to start with MQL5](https://c.mql5.com/36/35/how-to-start-with-mql5.jpg)
How to start with MQL5
- 2020.03.12
- www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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