Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1625
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
First, the difference is 1000 before the cycle. In the loop, if the opening price minus the current price is modulo less than the difference, then the difference is equal to the obtained value and the ticket is stored in a variable.
I was thinking the same thing) But something went wrong. Can you give me an example of how to track the opening price of the closest order to the current price online. Or maybe just compare them, and look for the lowest price)
I was thinking the same thing) But something went wrong. Can you give me an example of how to track the opening price of the closest order to the current price online. Or maybe just compare them and look for the lowest price)
Take a look at this:
correct this as well.
No need to multiply MODE_SPREAD - Spread in pips
you can check it.
and make it so
Good day Makar!
If you want to understand the logic of closing min and max orders, you've got two parts of the code. In words, it sounds like this: "If the drawdown of a grid of orders exceeds a certain level, we close min and max orders in the grid, with a profit not less than the specified level" .
Then "If the drawdown has fallen below the set level, we return to the principle of averaging of orders, all orders with a profit by all orders with a loss".
Then "If the drawdown has not decreased below the set level, we close again the next min and max orders when the profit is reached".
Now the Expert Advisor understands that if the drawdown is exceeded, the min and max orders are taken - the EA closes the first pair as it should, but it closes all other pairs at the same price without paying attention to profit calculation.
As far as I understand, I should look through the OrderClose()function to stop it in time. Thanks in advance for the help!!!!
Hi, sorry for the primitive question, but where can I find the contact details of the EA's tenant? Or how do I contact the person who has bought/rented an EA?
You can't. You can have a dialogue in the Product Discussion tab. You can post news in the relevant tab.
You can't. You can have a dialogue in the Product Discussion tab. You can post news in the appropriate tab.
Thank you!
Good afternoon.
Good day Makar!!!
I gave you another function...no need to add anything
Or you can move it...
I gave you another function...no need to add anything
or you can move it...
Nothing has changed