Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1490
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
And take into account that an order can generate several deals.
So either to pre-select for each order its deals, or to create an array/list (by the number of orders) of structures and fill them by searching deals.Why complicate your life? If you need to calculate the profit for a certain period, and in the source code this is what is done, then just go through the deals for this period. The IN deal has or may have a commission, the OUT deal may have a swap and profit in addition to the commission. Thus, having summarised everything, we got the desired result.
Another thing is if the task is to collect the profit for each position ID separately into an array.
Guys, help me. Earlier, when clicking on the mouse wheel, the cursor crosshair mode was activated in the terminal and MT4 and MT5. Now it has disappeared. How is it customised?
p.s. I have never put any mouse drivers, everything worked automatically....
Guys, help me. Earlier, when clicking on the mouse wheel, the cursor crosshair mode was activated in the terminal and MT4 and MT5. Now it has disappeared. How is it set up?
p.s. I have never put any mouse drivers, everything worked automatically....
It's not gone, it's just less responsive...
I even sinfully thought that the mouse is broken and the button is not being pressed once and twice
it's not gone, it's just less responsive.
I even thought that the mouse was broken and that the button was slipping.
I don't know. I've tested it many times and it's very responsive. No delays. It's never shown up once.
- Doctor, I have a pain here, and here, and here.
- Your finger is broken.)
Happy Holidays to all.
I need help from professionals.
I wrote this code in MQL4 to search for the order with the lowest opening price and get its data
Now I'm trying to transfer everything to MQL5, but for some reason it doesn't work(
What is the error?
for(int i=OrdersTotal(); i>=0; i--)
I didn't go into the essence of the code, but what immediately caught my eye was the incorrectly set number of orders to be searched. It should be like this:
And also in the loop you are looping through orders, but you are looking for position properties. This is also incorrect. I assume that most likely you need to loop through positions:
Regards, Vladimir.
I did not go into the essence of the code, but what immediately caught my eye was the incorrectly set number of orders to be searched. It should be like this:
And also in the loop you are looping through orders, but you are looking for position properties. This is also incorrect. I assume that most likely you need to loop through positions:
Regards, Vladimir.
Thank you very much.
I haven't tested all of them yet, but some of them are already working correctly.