4024 is the not very helpful "internal error" error. You might try to run it in debugger and try to isolate the code block that causes it.
Hello Proximus,
Could you know when this error occurs? Is it when you create an order? When you move your stops?...
Hello Proximus,
Could you know when this error occurs? Is it when you create an order? When you move your stops?...
Right after the initialization finishes, nothing is done until then, no order is put no if testing no nothing, just right after the init is finished the error is done.
Or shall i say after the first tick is processed since my error testing code is right at the end of the start like this:
int start() { //.....other stuff error=GetLastError(); if(error!=0){ Print("~~ERROR CODE: ",error); } return(0); }
Where the "error" is a global int
Of course the code is before that but a separate function is called in the start, and its not called until either an order is active to manage risk/sl or until a BUY/SELL condition just happened, so it doesnt get activated at the first tick, and also when i tested it in the demo account the orders were managed ok, so there was no problem with that section, so my guess is that either its in the init() or the EA itself has some other problems.
And my init() is this:
MathSrand(TimeLocal()+TimeCurrent()*VAR); magic=StringGetChar(Symbol(),5)+StringGetChar(Symbol(),4)*10+StringGetChar(Symbol(),3)*100+StringGetChar(Symbol(),2)*1000+StringGetChar(Symbol(),1)*10000+StringGetChar(Symbol(),0)*100000; Comment("");
there is a custom random initialization, and my magic number which is unique to each pair
Yes but i have no idea what causes it, my EA is 1000 lines long how am i going to find out what causes it?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I just finished making an EA run it on demo account and suddently when it initializes it shows error 4024 for no reason.
I`ve checked the code, it has no bugs or compile errors, and it didnt do anything yet.Either the MT4 is bugged here or am i missing something, i read the documentation it says "internal error" ,what does that mean and how can i avoid this error?
Help please!