Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1950
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
Thank you.
Not bad. I don't like arrays)))), and it never works the first time without debugging in arrays. ))) Especially shifts, copying, sorting not regular)))Thank you.
Not bad. I don't like arrays)))), and it never works the first time without debugging in arrays. ))) Especially shifts, copying, sorting not regular)))Every tool is good for its own sake.
But, insidious off-by-one error check and recheck ))
That's what a fresh look at your old code means!
I see two identical flaws, vestiges of the previous version.
One obvious sub-optimality.
And one obsolete design.
Looking for a free MT5 Expert Advisor that will close positions ALL when a profit or loss is reached, specified in the settings, and open new positions immediately in the direction specified in the settings. Can someone give me a link to the thread?
Or maybe you know an EA that just opens 1 position on the market if it sees that there are no open positions and does not close.
MT4 1353
What kind of error is shown in the log?
Code works correctly
MT4 1353
What kind of error is shown in the log?
The code works correctly.
Looks like some objects created via "new" are not destroyed on exit.
Looks like some objects created with "new" are not destroyed on exit.
Yes, I found the problem.
Moved the call to the top of the program and the error is gone
Do I understand correctly that after a successful OrderSend, the data structure of the market order properties is not filled in, and the same opening price for this order should be obtained by performing an OrderSelect?
Another question: in 5ka, is it better to open a position immediately with a SL and TP, or to open a position first and then modify it?
Do I understand correctly that after a successful OrderSend, the data structure of market order properties is not filled in and that the same opening price for this order should be obtained by performing an OrderSelect?
Not that I know of, and I have not seen it described.
As far as I understand, it depends on the price at which we need a loss and profit, the price that is in the terminal at the time of the opening request, or the price at which the position will actually open.