I assume me deleting the .ex4 caused the problem (accidentally deleted it thinking it was a duplicate) but, it could be another reason as it worked prior to that.
Now, when I attempt to attach it to charts. It comes back with an error that it is not an EA. My code has no errors, so I'm a bit lost what's wrong.
I've attempted to compile the EA, so i created a new .ex4 and tried copying my code into a new EA, but the same problem. It won't attach to the charts because it doesn't read it as an EA anymore.
When i first started, there were no issues.
Any ideas? I checked my experts and have the error "'EA' is not expert and can not be executed"
Are you sure that you the file that you are trying to attach to the charts -- is the same filename that you have recompiled? ie in past i thought I have a duplicate, and deleted the file or just part of the filename, and then tried to rename the file again as original name, but then I found that I had 2 or more files with similar names, but each had _2 or _3 or _4 to the end. Check that you are trying to attach the same file to the chart -- that you are recomplied.
I assume me deleting the .ex4 caused the problem (accidentally deleted it thinking it was a duplicate) but, it could be another reason as it worked prior to that.
Now, when I attempt to attach it to charts. It comes back with an error that it is not an EA. My code has no errors, so I'm a bit lost what's wrong.
I've attempted to compile the EA, so i created a new .ex4 and tried copying my code into a new EA, but the same problem. It won't attach to the charts because it doesn't read it as an EA anymore.
When i first started, there were no issues.
Any ideas? I checked my experts and have the error "'EA' is not expert and can not be executed"
It works when i put it into the scripts folder. so it is a script, not an ea. However I dont understand why there is a OnTicks function if it is a script.
Do you think it would be a good idea to delete any .ex4 files i have then so i could recompile and perhaps that could fix it?
Are you sure that you the file that you are trying to attach to the charts -- is the same filename that you have recompiled? ie in past i thought I have a duplicate, and deleted the file or just part of the filename, and then tried to rename the file again as original name, but then I found that I had 2 or more files with similar names, but each had _2 or _3 or _4 to the end. Check that you are trying to attach the same file to the chart -- that you are recomplied.
Might be a simple mistake, very new to coding this so it is a lot to take in. If I understand correctly, the OnTicks functions should only exist in scripts rather than EA. so better to remove that?
It works when i put it into the scripts folder. so it is a script, not an ea. However I dont understand why there is a OnTicks function if it is a script.
Might be a simple mistake, very new to coding this so it is a lot to take in. If I understand correctly, the OnTicks functions should only exist in scripts rather than EA. so better to remove that?
OnTicks usually will only occur in EAs.
Similarly, OnStart usually occurs only in scripts.
Whereas, you have both in the code.
No worries, and thank you for helping!. A bit disappointed that I don't know the difference between the script and main ea though.
I wonder, was it a waste of time adding a dynamic copyright? I'm considering just converting it back towards a simple static copyright to make the code smaller
I think I probably should have started this in mt5 aswell instead since it is backward compatible. But perhaps it is easy enough to convert to mt5 when i am done?
you're welcome and thanks for responding. Most peeps dont report that their issue is fixed, nor mention what they did to fix it.
No worries, and thank you for helping!. A bit disappointed that I don't know the difference between the script and main ea though.
I wonder, was it a waste of time adding a dynamic copyright? I'm considering just converting it back towards a simple static copyright to make the code smaller
I think I probably should have started this in mt5 aswell instead since it is backward compatible. But perhaps it is easy enough to convert to mt5 when i am done?
I do not see any issue either way; but i do think that when the compiler does "its thing", i think the #property lines are automaticly put into the preprocessor-process anyways. (i think that is the terms) hahaha
I think I probably should have started this in mt5 aswell instead since it is backward compatible. But perhaps it is easy enough to convert to mt5 when i am done?
You will have to change the MarketInfo to SymbolInfoDouble, but otherwise, it looks to me to be right after you change that, yeah. MT5 does not have MarketInfo
- 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 assume me deleting the .ex4 caused the problem (accidentally deleted it thinking it was a duplicate) but, it could be another reason as it worked prior to that.
Now, when I attempt to attach it to charts. It comes back with an error that it is not an EA. My code has no errors, so I'm a bit lost what's wrong.
I've attempted to compile the EA, so i created a new .ex4 and tried copying my code into a new EA, but the same problem. It won't attach to the charts because it doesn't read it as an EA anymore.
When i first started, there were no issues.
Any ideas? I checked my experts and have the error "'EA' is not expert and can not be executed"