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

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
Yes, thanks, I read the page. Only my knowledge in MKL4 was enough only to notice that in my loop the positions go from zero to the last, while in the example vice versa, from last to zero.I still don't know where to insertthe break. When I changed the loop to reverse, positions stop closing at all.
When closing positions, the loop must be reversed to avoid skipping positions. The break operator is not needed in this loop - it is the loop break and exit from its body. What you need is continue - the transition to the next loop iteration.
And only you know why it is not closing and what you have done for it.
When closing positions, the loop must be reversed so that no positions are skipped. You do not need break operator in this loop - it is an interruption and exit from the loop's body. What you need is continue - the transition to the next loop iteration.
Only you know why it cannot close, and what you did to fix it.
I followed the instructions exactly. Here is the corrected code:
Now it closes both positions but it won't close one but waits for the second. It's nuts. I thought maybe I inserted theClosePoz() function in a wrong place. The result is zero. I am crying out for help. It cannot be that no one is able to solve the problem.
how to cash out the original account ($100)?
Did exactly as instructed. Here is the corrected code:
Now it closes both positions, but it doesn't close one, it waits for the other. This is nuts. I thought maybe I inserted theClosePoz() function in a wrong place. The result is zero. I am crying out for help. It cannot be that no one is able to solve the problem.
I do not know. I drew it on my knee. Of course I can't check it - your conditions are not enough, so it's up to you.
And WPR inside of function to check - it is somehow not normal. WPR should be one of the conditions of call of closing functionI understand that you cannot modify the number of lots in a pending order.
Only open an additional one, with the volume you need.
Only open an additional one with the volume you want
It may be easier to delete an existing one and set up a new one. After all, the required volume does not have to be larger than the one already placed. And it is easier to follow one order.
Good day I have a question, I will explain how I understand it
Is there a written algorithm for Expert Advisors that buy candles at the very bottom and sell candles at the very top ?
how do i adapt it into an EA ?That would be great !!!
Good day I have a question, I will explain how I understand it
Is there a written algorithm for Expert Advisors which buy candles at the very bottom and sell candles at the very top?
And how do you adapt it into an EA ?Put BUY LIMIT on Low, and SELL LIMIT on High.
About the algorithms, dig the base