Download MetaTrader 5
To add comments, please log in or register
Sell products right in MetaTrader. Millions of traders are waiting for this!
bah12ram
76
bah12ram 2016.10.04 16:11 

I have this code in my indicator: #include "C:\Program Files\GKFX MetaTrader 4\MQL4\Libraries\htmcode.mq4"

is it possible to set this path as Extern variables so that I can change it externally?

Jose Francisco Casado Fernandez
2416
Jose Francisco Casado Fernandez 2016.10.04 17:44  
It's not possible, #include is a preprocessor directive and therefore the compiler must know which file you want to include, and it can't be changed later. Why did you want to do that???. Regards.
bah12ram
76
bah12ram 2016.10.05 09:39  
Jose Francisco Casado Fernandez:
It's not possible, #include is a preprocessor directive and therefore the compiler must know which file you want to include, and it can't be changed later. Why did you want to do that???. Regards.

Hallo thanks,

I want to share my indicator as Demo for one or two Month. and this Path must be changed individually.

would you please let me Know also, how can I code my file to share it as Demo for one or two Month.

Stanislav Korotky
17260
Stanislav Korotky 2016.10.05 11:54  
bah12ram:

I want to share my indicator as Demo for one or two Month. and this Path must be changed individually.

would you please let me Know also, how can I code my file to share it as Demo for one or two Month.

Why the path must be different? Usually, all paths in the teminal sandbox is standard. In your product use #include to include a header mqh-file for your library, which in turn will be always searched for and loaded from the \libraries subfolder. You may embed time limitation into the library.
Stanislav Korotky
17260
Stanislav Korotky 2016.10.05 11:58  
As a workaround, you may code your indicator in 2 parts: 1) front-end indicator and 2) worker back-end indicator. In the front-end indicator you can provide an input string parameter with the name of the back-end indicator (will be called via iCustom). All calculations should be perfromed in 2) while 1) should display results on the chart.
/
To add comments, please log in or register