![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
Hello to all professors
I wrote another code with higher accuracy
But I think it should work properly
But I could not draw conclusions from this code
Where is my code problem?
Just For Reference
Try this one.... test yourself before using.....
Try this one.... test yourself before using.....
Some Shortcomings :
First of All,one For() Loop cannot make sure that all orders can be colsed those should be,if some failed they will be ignored by your code;
Secondly,we can get total Lots and Profit in only one For() Loop,that is higher efficient.
Hello to all professors, with this code I want to come and calculate the whole Lot first (for example, purchase)
Then we calculate that if 10% of the imported Lot goes to profit, it will close all the orders.
But it has a little problem and it does not do that.
Just For Reference
Hello dear teacher and friend
I tried your code, it works properly
But to become more professional, it needs a few modifications
We want this code to calculate the volume of positions (buy and sell) separately and also to close the positions separately.
When I use your code and just change the magic number, it does the calculations well
But if I want to use 2 magic separately, only the positions (bye with magic 3) are calculated correctly and it is closed and the positions (tuberculosis with magic 4) are not calculated and are not closed.
I modified the code like this and got no result
Thanks to all the professors (for helping)
The problem was solved.
Hello dear teacher and friend
I tried your code, it works properly
But to become more professional, it needs a few modifications
We want this code to calculate the volume of positions (buy and sell) separately and also to close the positions separately.
When I use your code and just change the magic number, it does the calculations well
But if I want to use 2 magic separately, only the positions (bye with magic 3) are calculated correctly and it is closed and the positions (tuberculosis with magic 4) are not calculated and are not closed.
I modified the code like this and got no result
I've tested only by mind because there is no order open module in this code
I've tested only by mind because there is no order open module in this code