I already know below error would like to say 'Object already exist', and I checked out all of my Label object names, and their names very different.And just I would like to know where that problem come from?(I just inform I use Label Create function for EA's)
Thanks in advance.
( English is not my native language )
Oh! I can't understand your comment, sorry?
// second times edited
That's really annoying me. And I can't give my attention to my code.So, I use one function in 2 places 1 - init special function and 2 - OnTick function, which one I use it for 'Spread sheet', so when I remove spread sheet label object that error warring disappear.
Please, help me if you can help me.
You can find the error codes here: https://book.mql4.com/appendix/errors
Each object must have a unique name. It sounds like you are trying to create an object called "Spread sheet" twice.
You can put this at the start of your EA:
And then call ErrorDesciption() in your code e.g.
I just disabled 'Spread sheet' temporarily, because I haven't had enough time for it.I followed your code, so I just replaced your code instead of below code, and I do not see any 'Warnings' yet, while 'market closed'...
I hope it will work for me.
Just bear in mind that your code will only give you the error number, not the error description.
You'll need to manually look up any codes you get in the link I posted above.
If you use stdlib.mqh you can print out the error description automatically.
Yeah! I already put it in 'Head'.And I just tested it, it gives me below message.
I think it's work.
#4108 - Open
Below code closes all opening orders, but can't close Pending orders, and when I try to close I get this error: #4108 - ERR_INVALID_TICKET - Invalid ticket.
I need help please.
#4108 - Closed
Oh! I never mind it, I will try it soon.
Thanks for your comment.
#4051 - Open
Below part of code gives me Error #4051Even I use below code method for my EA Trade Panel without any issues.
for ( i = OrdersTotal() - 1; i >= 0; i-- )
if ( ! OrderSelect( i, SELECT_BY_POS, MODE_TRADES ) ) continue;
if ( OrderSymbol() != Symbol() ) continue;
if ( OrderType() != OP_BUY ) continue;
res = OrderClose( i, lots, OrderClosePrice(), 3, clrRed );
if ( ! res ) Print( " | Order Close Error #", GetLastError() );
else Print( " | Order Modified Successfully." );