ea not working
-
Hi,
There is no compilation error but in Metatrader ea is grayed out. Can't figure out what is wrong. Can you please look at it.
http://fxdreema.com/shared/lbN48eE2
thnx
-
You mean that in the list of Experts of MT4 it's color is gray? That's because no .mq4 file is present, only those who have source code files in the experts folder are colored.
-
I noticed that you are using "For each Closed trade" block. Be aware that in real mode you may have many many closed trades, all in the history, and this block will do them all most probably. Maybe I have to add some time limit option (to stop the cycle when the trade's close time is too old), but you can also limit them by number, look at the "Not more than n history trades" option. Also that block "(loop) break" can be used.
-
__I noticed that you are using "For each Closed trade" block. Be aware that in real mode you may have many many closed trades, all in the history, and this block will do them all most probably. Maybe I have to add some time limit option (to stop the cycle when the trade's close time is too old), but you can also limit them by number, look at the "Not more than n history trades" option. Also that block "(loop) break" can be used.[/quote:305ppvqu]
Still grayed out. At this point is working http://fxdreema.com/shared/1n7dJkhWd
But when i add additional variables and constants it gets greyed out in metaeditor (everything ok when compile). http://fxdreema.com/shared/1n7dJkhWd
I will try build it from scratch.
-
What do you mean by "gray"?
-
__What do you mean by "gray"?[/quote:35xytv4r]
I see ea on metatrader but cant get it to open. It is not in color, like something is wrong with the code.
Other ea work, even the ones that i created with fxdreema. But new created ea's dont work.
I will try it tommorow on other computer.
-
As I said this color has nothing to do with the EA internally. When MT4/MT5 is starting it automatically deletes any EA with wrong format (corrupted files), so if you are seeing it there, it should work.
Well, yesterday I was doing some updates and there was a period where experts were exported in "corrupted" format but not deleted by MT4. MT5 was actually able to handle this, but MT4 was not. So if your EA is 1-2 days old... this can be the case. But if it can be loaded and saying "Starting..." then it's fine. And if it is corrupted, then look at the logs and you will see an error message.
Otherwise about the gray color, if you don't believe me look here: http://forum.mql4.com/54308 The color is gray when .mq4 is not there, only .ex4, and it does not tell anything about the quality of the EA itself.
-
__As I said this color has nothing to do with the EA internally. When MT4/MT5 is starting it automatically deletes any EA with wrong format (corrupted files), so if you are seeing it there, it should work.
Well, yesterday I was doing some updates and there was a period where experts were exported in "corrupted" format but not deleted by MT4. MT5 was actually able to handle this, but MT4 was not. So if your EA is 1-2 days old... this can be the case. But if it can be loaded and saying "Starting..." then it's fine. And if it is corrupted, then look at the logs and you will see an error message.
Otherwise about the gray color, if you don't believe me look here: http://forum.mql4.com/54308 The color is gray when .mq4 is not there, only .ex4, and it does not tell anything about the quality of the EA itself.[/quote:20gj10rl]
I'v try it on different computer using web fxdreema. On there is older metaeditor and when i hit compile it gives me this error on every new ea:
'long' - variable not defined C:\Documents and Settings\DarK Pariah\Desktop\testtt.mq4 (754, 1)
'inp' - comma or semicolon expected C:\Documents and Settings\DarK Pariah\Desktop\testtt.mq4 (754, 45)
'long' - unexpected token C:\Documents and Settings\DarK Pariah\Desktop\testtt.mq4 (754, 61)This one is simple http://fxdreema.com/shared/9un4k9DWd
-
Oops, i thought this was fixed yesterday, I obviously forgot to upload some file. It's ok now, thanks for the report.
I was using a new function for the new "on Chart" event that is using long datatype which is not valid in the old MT4. Also that whole "on Chart" think is not valid in it, just to mention.