Hello everyone. I am working on an EA and it's starting to contain a LOT of functions. I'd like to make a libray for these functions, (actually I have so many, I'm probably going to make 3 different library files to make things even more straightforward). Some of the functions need to share global variables with the main EA. I was going to simply create the library files an use them the standard way, but then I found out that I will need to include these files in the MT4 library folder when I want to run it, in other words, they don't compile into the EA. I don't want external files i have to make sure are there, I want everything compiled into just one EA. So I decided to go the #include "mylib.mqh" route. But I couldn't compile my library files without declaring the variables that are already declared in my main ea. Won't redeclaring them here reset them?
How best to do this?
- #2
- Jul 26, 2010 8:22pm Jul 26, 2010 8:22pm
- Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts
- #4
- Jul 26, 2010 9:24pm Jul 26, 2010 9:24pm
- Joined Jul 2007 | Status: 33 y/o Investor/Trader/Programmer | 5,016 Posts
- #9
- Oct 25, 2012 3:47pm Oct 25, 2012 3:47pm
- Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts
- #11
- Oct 26, 2012 8:29am Oct 26, 2012 8:29am
- Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts
- #13
- Last Post: Oct 26, 2012 9:53am Oct 26, 2012 9:53am
- Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts