- Signals : Ask & Say Anything & Everything About MQL5 Trading Signals
- Basic questions ...
- Maximun number of orders allowed??
how to limit the number of orders on mt4 to be allowed ? to open maximum 5 orders for example? is there any EA or script for this? or configuration?
#define MAX_ORDERS 5 ... if(OrdersTotal()>=MAX_ORDERS) { // Don't add new orders } else { // You can add new orders }
Hi,
Can you assist how this can be added on MT4
Hi,
Can you assist how this can be added on MT4
neozbr: but how I add this command to the mt4? there is any tutorial ? where can I learn how to add please?
| You have only three choices: Search for it,
learn
to code it, or pay (Freelance) someone to code it. We're not going to code it for you. We are willing to help you when you post your attempt (using SRC) and the nature of your problem. |
Sure.
Please inbox me and let me know.
The 3 threads that you have started asking the same question and using Alain's code example have now all been deleted.
Asking the same questions will not get different answers in a new thread.
#define MAX_ORDERS 5 ... if(OrdersTotal()>=MAX_ORDERS) { // Don't add new orders } else { // You can add new orders }
Alain's example is only intended to be an outline. Where he writes
// You can add new orders
is where you slot in existing code to check conditions and place orders if conditions are met. This is obvious to anyone with a rudimentary knowledge of coding mql4.
Before you can modify code, you have to learn how to. That takes effort and time.
If you do not want to put in the effort or do not have the time, then follow Honest Knaves advice.
how to limit the number of orders on mt4 to be allowed ? to open maximum 5 orders for example? is there any EA or script for this? or configuration?
I've been a programmer since 1970 in high school. I use the internet constantly for tips and examples and have managed to stay current with programming styles, trends and techniques. It amazes me how arrogant the people are on the mt4 forum when responding to legitimate questions from new users. It frustrates me when I find a thread referring to the exact same question I have and some "know-it-all" posts a link and says read the manual. You know what? The manual is not helpful. Very few examples. I would make a suggestion to the self proclaimed "Guru's of MT4" to apply a little effort and type an answer. If you don't know, don't refer someone to the manual. Just remain quiet and let someone who knows be helpful and answer the question. It will result in a much better forum where people like me can find quick answers.
My answer:
No, there is not. The only way to limit the number of orders in MT is to keep track of them in your EA code using variable(s) that you set. There isn't a control setting or menu item to click in the platform to accomplish this.
Now how hard was that? How long would you need to read the manual to figure that out? The answer isn't in the manual. Just an absence of the function. My humble suggestion: Post answers to questions. Don't post links and call the person asking the question stupid or lazy. You are the lazy one.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use