Using extern's when using include file

Your basic questions about running EA's
Post Reply
Moyo
Posts: 3
Joined: Sat Apr 20, 2013 4:58 am

Using extern's when using include file

Post by Moyo »

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?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: Using extern's when using include file

Post by milanese »

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
Moyo
Posts: 3
Joined: Sat Apr 20, 2013 4:58 am

Re: Using extern's when using include file

Post by Moyo »

Here are the files...
You do not have the required permissions to view the files attached to this post.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: Using extern's when using include file

Post by milanese »

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
You do not have the required permissions to view the files attached to this post.
Moyo
Posts: 3
Joined: Sat Apr 20, 2013 4:58 am

Re: Using extern's when using include file

Post by Moyo »

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?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: Using extern's when using include file

Post by milanese »

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
ovo.cz

Re: Using extern's when using include file

Post by ovo.cz »

I do not think there is a limit, but you have to strip out #property library, if it is not a library.
Post Reply

Return to “Automated trading (Rookies)”