extern and not extern?

 

Hi just another question,

Lets say i have an EA with.

extern double  Take_Profit               = 10; 
extern string  Friday_Close_Time         = "19:30";
extern bool    Auto_Lot                  = false;
extern int     Max_Orders                = 1;

And i change this to not extern, becuase i dont want to have this options visible.

double  Take_Profit               = 10; 
string  Friday_Close_Time         = "19:30";
bool    Auto_Lot                  = false;
int     Max_Orders                = 1;

Will it work properly?

 
pontuso:

Hi just another question,

Lets say i have an EA with.

And i change this to not extern, becuase i dont want to have this options visible.

Will it work properly?


https://book.mql4.com/variables/types
 
pontuso:

Hi just another question,

Lets say i have an EA with.

And i change this to not extern, becuase i dont want to have this options visible.

Will it work properly?


If it works properly with the external variables, then it will work properly with global scope variables
 
GumRai:

If it works properly with the external variables, then it will work properly with global scope variables

Nice =)


deVries 2013.11.11 13:03 #
 
GumRai:

If it works properly with the external variables, then it will work properly with global scope variables
Unless, of course, it's an Indicator that you are calling from another Indicator or EA, then changing from externs may well mess up your iCustom() calls . . .
 
GumRai: If it works properly with the external variables, then it will work properly with global scope variables

Agree... it works. I'm not a big fan of passing parameters to functions || indicators || ea.

1st thing I do after downloading any custom indicator is change the externs to globals.

 
RaptorUK:
Unless, of course, it's an Indicator that you are calling from another Indicator or EA, then changing from externs may well mess up your iCustom() calls . . .


Good point

but in the OP

"Lets say i have an EA with......"

 
GumRai:


Good point

but in the OP

"Lets say i have an EA with......"

I must have been when I typed my reply

Optimization only works with extern non-bool parameters . . . thats relevant to an EA.

Reason: