How to place working functions ina separate file

 

I am developing my code and it keeps getting longer!

I am sure there must be a way to place - say - working functions (1 or more) into a separate file.


I have seen the include, scripts etc but haven't found just what I need to do.

 

#include <yourfunctionsfile.mqh>


and place the file in the include folder. Thats all you need. You also don't need to compile it separately, it will be included and compiled on the fly together with the main file.

 
7bit:

#include <yourfunctionsfile.mqh>


and place the file in the include folder. Thats all you need. You also don't need to compile it separately, it will be included and compiled on the fly together with the main file.


I had been trying #include <Magic_Numbers.mq4>

4 NOT h

#include <Magic_Numbers.mqh> works fine - many thanks
 
FWIW the Magic Numbers for an EA is one bit I *wouldn't* keep in a common copy book
Reason: