Just made an IDE for MQL4

Post Reply
f-trader
Trader
Posts: 27
Joined: Sat Feb 25, 2012 4:08 pm

Re: Just made an IDE for MQL4

Post by f-trader »

garyfritz wrote: Do I have to set up something in SciTE to get it to invoke the compiler right?
I have several include files and the scite IDE compiles it without errors.
No idea why it doesn´t work for you. All of my IDE settings are default (except font-size).
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Just made an IDE for MQL4

Post by SteveHopwood »

garyfritz wrote:Apparently I haven't compiled anything with #include files for a while...

I have the include files under experts\include. When I try to compile an indicator that references them (with e.g. "#include <stdlib.mqh>") I get "cannot open the program file" errors.

I tried opening Metaeditor and it compiles it just fine.

Do I have to set up something in SciTE to get it to invoke the compiler right?
All my code has
#include <WinUser32.mqh>
#include <stdlib.mqh>

and I do not have a problem, and I pretty much use ScITE ootb, apart from a few disply thingies to make my life more comfortable - wrap, display the functions sorted by name, that sort of thingy.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
garyfritz

Re: Just made an IDE for MQL4

Post by garyfritz »

OK, this is getting stranger.

As I said, this indicator with #includes compiles fine in Metaeditor but not SciTE. Not my SciTE anyway. I tried downloading and installing a fresh SciTE -- no improvement.

I've been doing more indicators than EAs lately. The last EAs I compiled were ShelleyNOW and the BJS Basket EA. I just compiled them again and it worked fine -- and they include stdlib.mqh and WinUser32.mqh. If I copy the identical #include to the indicator I'm trying to compile, it fails. Is there something different about #includes in an indicator?

I looked at stdlib.mqh. The first line in it says "#import <stdlib.ex4>". stdlib.ex4 doesn't exist anywhere in this Empty4 tree. If it's trying to import it, why don't the ShelleyNOW / BJS compilations hit an error?

I thought, OK, it wants stdlib.ex4. So I'll compile stdlib.mq4. Didn't expect it to do much, and it didn't. No compile errors, but no .ex4 output either.

So I found a stdlib.ex4 in an older Empty4 folder under experts\libraries. Copied it to experts\libraries in my Empty4 and tried again. No improvement.

I be confoozed...
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Just made an IDE for MQL4

Post by SteveHopwood »

garyfritz wrote:OK, this is getting stranger.

As I said, this indicator with #includes compiles fine in Metaeditor but not SciTE. Not my SciTE anyway. I tried downloading and installing a fresh SciTE -- no improvement.

I've been doing more indicators than EAs lately. The last EAs I compiled were ShelleyNOW and the BJS Basket EA. I just compiled them again and it worked fine -- and they include stdlib.mqh and WinUser32.mqh. If I copy the identical #include to the indicator I'm trying to compile, it fails. Is there something different about #includes in an indicator?

I looked at stdlib.mqh. The first line in it says "#import <stdlib.ex4>". stdlib.ex4 doesn't exist anywhere in this Empty4 tree. If it's trying to import it, why don't the ShelleyNOW / BJS compilations hit an error?

I thought, OK, it wants stdlib.ex4. So I'll compile stdlib.mq4. Didn't expect it to do much, and it didn't. No compile errors, but no .ex4 output either.

So I found a stdlib.ex4 in an older Empty4 folder under experts\libraries. Copied it to experts\libraries in my Empty4 and tried again. No improvement.

I be confoozed...
In response to this, I loaded up one of the umpteen custom indis and added

Code: Select all

#include <WinUser32.mqh>
#include <stdlib.mqh>
to it.

Now, Gary, you know that I love the rare occasion when I can get one over on you and will crow to the heavens when this happens (heroically resists the opportunity to mention the self-banning incident :lol: )

On this occasion, no, sadly. ScITE threw up the same error message you got.

Hey ho.

Luckily for me, this is Someone Else's Problem - you know my antipathy towards indi code - but definitely a problem.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
garyfritz

Re: Just made an IDE for MQL4

Post by garyfritz »

OK, MetaEditor compiles it OK.
SciTE fails for both me and Steve.

Sounds like a SciTE-specific problem to me...
w633
Trader
Posts: 82
Joined: Sat Mar 10, 2012 1:49 pm

Re: Just made an IDE for MQL4

Post by w633 »

garyfritz wrote:OK, MetaEditor compiles it OK.
SciTE fails for both me and Steve.

Sounds like a SciTE-specific problem to me...
i took a look at the problem, and the issue is coming from the compiler from MetaQuotes, their metalang compiler doesn't seem to be intelligent enough to know where to look for included files, and currently I don't have a solution for it.

the only work around i can give so far is to create a directory symbolic link called "include" in indicator folder that points to "expert/include" folder, tedious but effective.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Just made an IDE for MQL4

Post by SteveHopwood »

Just discovered the same problem when coding a script. Nothing to worry about - merely reporting.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
jjasper7
Trader
Posts: 87
Joined: Mon Mar 19, 2012 11:44 pm
Location: Mesa,AZ (near Phoenix)

Re: Just made an IDE for MQL4

Post by jjasper7 »

i am trying to include some files including a new one of small routines/snippets pulled out of the main ea (to reduce size), but do not understand how to make and use the symbolic link mentioned above. would someone please elaborate the process for me? i suspect a second problem might be coming up soon... one of my routines i am trying to add, will alert me with a specific sound, so those 'sounds' will also need to be called from the routine (meaning an #include in the #include). should the same kind of link definition probably work. i have Empty4 set up in c:\fx\fxcm (instead of the programs dir)
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Just made an IDE for MQL4

Post by SteveHopwood »

jjasper7 wrote:i am trying to include some files including a new one of small routines/snippets pulled out of the main ea (to reduce size), but do not understand how to make and use the symbolic link mentioned above. would someone please elaborate the process for me? i suspect a second problem might be coming up soon... one of my routines i am trying to add, will alert me with a specific sound, so those 'sounds' will also need to be called from the routine (meaning an #include in the #include). should the same kind of link definition probably work. i have Empty4 set up in c:\fx\fxcm (instead of the programs dir)
Just a tiny word of advice here. It sounds as though you are making life unnecessarily complicated for yourself.

Best not to. If there is a simpler route, then follow it.

Crapql4 is not set up to do complex thingies. It is only barely set up to do simple thingies - and fails there a lot of the time. Ask it to do anything complicated and you are storing up trouble for yourself. Guess how I know? :lol:

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
jjasper7
Trader
Posts: 87
Joined: Mon Mar 19, 2012 11:44 pm
Location: Mesa,AZ (near Phoenix)

Re: Just made an IDE for MQL4

Post by jjasper7 »

thanks for sharing your knowledge - and i don't need to ask. i was trying to simplify by taking fixed/proven code out of the pictue, but i can see how this solution can be a dumb thing. regardless, i need to include the sound files and stdlib, so am still interested in how to handle it, and even why there is a glitch for some of us. i restarted the system, and am now able to include the stdlib file - i should have tried that earlier
i am so pleased with this new editor, thanks will.
Post Reply

Return to “Coders Hangout”