stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Using extern's when using include file
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3216
Page 1 of 1
Author:  Moyo [ Tue Oct 22, 2013 2:39 am ]
Post subject:  Using extern's when using include file

I am modifying a simple indicator which I want to use to e-mail a regular report. The indicator has the two standard “include files”, but when I add the third include file then the extern’s do not appear in the properties window. They basically act as normal internal variables which can only be edited by going to the code.

#include <stderror.mqh>
#include <stdlib.mqh>
//#include <KDstdlib.mqh>

The “KDstdlib” file is basically a copy of the “stdlib” file, but with new functions. The file has been compiled and I followed the instructions posted by someone from another group a while ago: “SaveAs into the Include folder by changing the ext to "mqh" from "mq4"”

The “KDstdlib” functions work when I use the indicator, so it is only the issue that I cannot set the important variables externally. Can someone please give me some pointers as to how I can resolve this issue?
Author:  milanese [ Tue Oct 22, 2013 11:44 am ]
Post subject:  Re: Using extern's when using include file

Hi Moyo,

maybe you could attach the indicator, you want to change, and the KDstdlib.mqh, so it would be probably easier to help you.

Cheers :)

Tommaso
Author:  Moyo [ Tue Oct 22, 2013 9:04 pm ]
Post subject:  Re: Using extern's when using include file

Here are the files...
Author:  milanese [ Tue Oct 22, 2013 9:11 pm ]
Post subject:  Re: Using extern's when using include file

Moyo wrote:Here are the files...
Hi Moyo,

Edit: try the attached one, I have integrated the KDstdlib in the indicator, should now work as you have intended
Cheers:)

Tommaso
Author:  Moyo [ Wed Oct 23, 2013 9:28 pm ]
Post subject:  Re: Using extern's when using include file

Thanks for that Tommaso.

I actually want the KDstdlib to be separate as I intend to add a few more functions which I want to share (include) with other files.

Do you know if there is a limit as to how many include files can be used?
Author:  milanese [ Wed Oct 23, 2013 9:47 pm ]
Post subject:  Re: Using extern's when using include file

Moyo wrote:Thanks for that Tommaso.

I actually want the KDstdlib to be separate as I intend to add a few more functions which I want to share (include) with other files.

Do you know if there is a limit as to how many include files can be used?
Hi Moyo,

I don't know if there are limits, maybe you should try to merge the stdblib in your mod. if you want the KDstdlib as a seperate file..

Cheers :)
Tommaso
Author:  ovo.cz [ Thu Oct 24, 2013 5:56 pm ]
Post subject:  Re: Using extern's when using include file

I do not think there is a limit, but you have to strip out #property library, if it is not a library.
All times are UTC Page 1 of 1