No idea it looks like this Code count All open trades instead of only from ea
Raphael Schwietering:
Hello,
have someone an idea or codes snippet for me that an ea only open so much trades that i have define in an input value.
Now i use this
but it looks like it is not working very well.
Find the error with GetLastError()
if(OrdersTotal() >= maxOrders) { Print("Maximum Orders"); return; }
BTW, it might need to be <= maxOrders
Using OrdersTotal directly and/or no Magic number filtering on your
OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual
trading.)
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 and MetaTrader 4 - MQL4 programming forum
MagicNumber: "Magic" Identifier of the Order - MQL4 Articles
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 and MetaTrader 4 - MQL4 programming forum
MagicNumber: "Magic" Identifier of the Order - MQL4 Articles
I think the EA only counts the orders from the input magic. For example if you run the same EA on another pair or even in the same pair I think it will not count the orders. For that you might have to use a script I think.
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
Hello,
have someone an idea or codes snippet for me that an ea only open so much trades that i have define in an input value.
Now i use this
but it looks like it is not working very well.