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 used to publish my own set on closing different types in codebase at one time.
https://www.mql5.com/ru/code/mt4
And here, sorry, wrong forum.
No offence.
Oh, that's not it :-), now.
https://www.mql5.com/ru/code/9052
Oh, that's not it :-), now.
https://www.mql5.com/ru/code/9052
Yes, your kit is good, however I can't figure out where the bug is in my code.
Yes, your kit is good, however I can't figure out where the bug is in my code.
OrdersTotal()
does not exist ! Then it will work :
Sometimes the stubbornness is just astounding. On page 3 of this thread and further down the thread you were shown the correct example of order overruns. RTFM at the end of the day. How many times do I have to tell you : Exit outside the array. Orders with number
does not exist ! Then it will work :
Vladislav, I apologise, it's not stubbornness, but rather inattention. I was experimenting and didn't correct the code.
Of course it is:
However, this does not seem to be the reason, because the corrected design
still closes orders only on the pair of the window on which you throw the script, but not all pairs.
From the starter's profile "I write in MQL4, including bespoke." - a typical example of over-zealousness.
I understand programmers can be average. You get used to it. And I myself sometimes write bad code, though I try. But what would be...
I confirm someone's old assumption, the starter has wool in his head.
Vladislav, I apologize, it's not stubbornness, but rather inattention. I was experimenting and didn't correct the code.
Of course it is:
However, that does not seem to be the reason, because the corrected design
still closes orders only for a pair of the window on which the script is thrown, but not all pairs.
If all pairs, then you are not using Ask correctly, Bid - you are taking from the current chart. If you process errors when closing orders - you would see the messages.
instead of Ask - MarketInfo(OrderSymbol(),MODE_ASK); instead of Bid - MarketInfo(OrderSymbol(),MODE_BID);
Good luck.
ZS and change the name of the script, because according to the name it works correctly ;).
From the starter's profile "I write in MQL4, including bespoke." - a typical example of over-zealousness.
I understand programmers can be average. You get used to it. And I myself sometimes write bad code, though I try. But what would be...
I confirm someone's old assumption, the topic-starter has wool in his head.
It's a shame to hear that, of course. However, I never take orders that I cannot fulfil. And you, I hope, understand that order levels can also vary. And, as someone said - There's no shame in not knowing. It's a shame not to ask.... And as I understand it, this forum exists precisely to provide an opportunity for learning. And so your, snobbishness is not clear to me, and your criticism, I do not accept. Although I admit that you are the smartest on this forum.
P.S. The art of programming is not in the ability to write code, but in the ability to make a correct algorithm. It's like if you have been driving a Lada all your life and then you moved to Mercedes and don't know where all the knobs and buttons are, you haven't become a bad driver because of that.
If all pairs, you are not using Ask correctly, Bid - you are taking from the current chart. If you processed errors when closing orders, you would see the message.
instead of Ask - MarketInfo(OrderSymbol(),MODE_ASK); instead of Bid - MarketInfo(OrderSymbol(),MODE_BID);
Good luck.
Thank you very much, I'm processing the errors, the message comes back - wrong price, but I can't figure out what's wrong.