Use of libraries

 

I downloaded the file OrdersSuite.mqh from the code base here but am having some trouble using it. Looking at the code for OrdersSuite it itself icludes TimeSuite.mqh.

I included the files in my script as below:


#include "..\libraries\OrdersSuite.mqh"
#include "..\libraries\TimeSuite.mqh"


However upon compilation I recieve the message 'TimeSuite.mqh' - cannot open the program file. I can open an access both files fine. Come someone please explain what I am doing wrong please?

 

Just ideas

1) TimeSuite.mqh - is that the exact name of the file on your disk

2) If you are on Vista, are the files really where you think they are?

Good Luck

-BB-

 

try

#include <OrdersSuite.mqh>

OrdersSuite.mqh should be in \experts\include folder

 

TimeSuite.mqh is the exact name of the file and they are both in the \experts\include folder.


Below is an extract from OrdersSuite.mqh. There are no includes within the TimeSuite.mqh file.

//+------------------------------------------------------------------+
//| EX4 imports |
//+------------------------------------------------------------------+
#include <stdlib.mqh>
#include <TimeSuite.mqh>

 

Update


Managed to get it working. The problem was that as I had originally placed them in the libraries folder. Then after moving them to include the .ex4 files still remained in the libraries folder. Deleting them, and then only including the OrdersSuite.mqh file in my script seems to have worked correctly. Thank you for your help.

 
.. another example of Mt4 being full of bugs, why redundant file in wrong location should affect reading of correct file in correct locatiom... sometimes spending hours with similar bugs and driwing me nuts... I want to learm C++ so I can get out of MT...
 
luckyluke72:
.. another example of Mt4 being full of bugs, why redundant file in wrong location should affect reading of correct file in correct locatiom... sometimes spending hours with similar bugs and driwing me nuts... I want to learm C++ so I can get out of MT...

No, this was not the reason.

MT4 will not look at any (wrong or redundant) .ex4 files when including, it will not even look for any .ex4 files at all. It was a user error. He placed the include files not into the include directory, so #include could not find them. The .ex4 files that were lying around did not influence anything at all. It ws the fact that he fixed the wrong #include directive in his script that fixed the problem, not the deleting of some unrelated files in an unrelated folder.


"I want to learm C++ so I can get out of MT..."

You must be joking!?!?

10 seconds ago you complained about confusing buggy software, illogical behavior, redundancy, "driving you nuts" and similar things and in the very same sentence you say you now want to learn C++? Of all the beautiful programming languages that exist on this little blue planet you chose the GRAND MOTHER of all the aforementioned annoyances, confusions and inconsequences, all combined in one and a half language and risen to the power of 12?

 

@7bit you are entitled to your opinion, and I let your previous rant against C++ go unanswered, but I have to leap to its defence this time. I find C++ a wonderful language.

I started programming in FORTRAN (*cough* 40 years ago), then PL/I, IBM mainframe Assembler (perhaps my favourite), COBOL (arguably the worst language), dBase, various micro Assemblers, Delphi, BASIC, VB, VB.Net, C# (usually my current development language - easier but IMNSHO not as powerful as C++), and probably a few others I've used & forgotten about. Oh, and MT4 in very recent times.

Each have their good & bad points. From COBOL I learned the benefit of long and meaningful names, and even C++ has some bad points - multiple class inheritance was a mistake in my view; multiple interface & single class inheritance (like C#) is better IMHO.

Reason: