Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1396

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
I see that we are having a real discussion. Alex, you are involved in it as well:)) Well, Mr. programmers, do you have a consensus? Look, the main function is to close orders of the same type based on total profit. 4 positions are opened, 2 of them in EURUSD (buy and sell) and 2 of USDCHF (buy and sell).If buy orders get a profit it closes them, leave the sell order alone or leave the sell order alone.
Catch
I see that we are having a real discussion. Alex, you are involved :)) Well, mister programmers, do you have a consensus? Look, the problem is to close orders of the same type for a total profit. 4 positions are opened, 2 of them on EURUSD (buy and sell) and 2 of USDCHF (buy and sell).If buy orders get a profit it closes them, leave the sell order alone or leave the sell order alone.
like this? :)
Catch
like this? :)
like this? :)
If you have 3 positions opened at different pairs, i.e. 2 Bai and one Sell, then yes, in this case the robot will close the positions when the total profit is achieved. If you try to open 4 positions on 2 pairs, you will never get the total profit in this case, the expert closes the pairs of orders, either buy or sell. But he closes the buy EURUSD and buy USDCHF or any other selected pair.
here are a lot of bays and selves)
Did you make the dialog box yourself or SB?
Are there any panels?
ps. unless there are objects if you do
Are there any panels?
Yes, that's why I'm asking.
If you did it yourself, please share the code (collapse, expand, move)
here are a lot of bays and selves)
Taras :) You should open 4 positions in one step. 1 long in EUR, one long in CHF, then two more, one sell in EUR, one sell in CHF. And look when buy and buy reaches the total profit the bot will close both of them or not. And in your screens I see orders for one instrument that should not be a priori.
grouping pairs by either buy or sell is wrong
For example on one pair (buy) there could be a buy of the dollar and on the other pair (sell) there could be a sell of the dollar.