Help or advice please.

 
For anyone willing to take the time to explain, if you create a custom indicator, how do you "encrypt it" for a better word, so others can use it without the code being viewed, thanks to anyone contributing, I do understand there is help in the "book" but i am asking for a contribution if i could please, not to techy with the lingo, R
 
robbo:
For anyone willing to take the time to explain, if you create a custom indicator, how do you "encrypt it" for a better word, so others can use it without the code being viewed, thanks to anyone contributing, I do understand there is help in the "book" but i am asking for a contribution if i could please, not to techy with the lingo, R
You write the code as an MQ4 file. This is readable by the editor and any text editor as it is a plain text file. When you compile it you get an executable file with an EX4 extension. This is not readable with a text editor and you can give it to people who then cannot easily read your code. However, there exist programs called "decompilers" which can return some sort of text file of the code. Google "MQL4 decompiler". There are other threads on here where the idea of protecting code is discussed. It is far from simple if the simple level of protection of only supplying the EX4 file is not enough. Often the use of external DLLs is considered but that is a somewhat more complicated idea for a "non-techy" person.
 
Thank you kindly Dabbler, understand the decom etc,, however, it seems that when i compile the indicator it does not include an ex4, with this said, i have created templates and saved them and you see a paddlock around them, i never seem to be able to find or open them in the "files" etc.. thanks R
 
robbo:
Thank you kindly Dabbler, understand the decom etc,, however, it seems that when i compile the indicator it does not include an ex4,

Check in your indicators folder. Mine is

C:\Program Files\MetaTrader\experts\indicators

If you sort the folder by date then the just modified indicator (MQ4) and the just compiled indicator (EX4) should be right next to each other.

 
dabbler:
You write the code as an MQ4 file. This is readable by the editor and any text editor as it is a plain text file. When you compile it you get an executable file with an EX4 extension. This is not readable with a text editor and you can give it to people who then cannot easily read your code. However, there exist programs called "decompilers" which can return some sort of text file of the code. Google "MQL4 decompiler". There are other threads on here where the idea of protecting code is discussed. It is far from simple if the simple level of protection of only supplying the EX4 file is not enough. Often the use of external DLLs is considered but that is a somewhat more complicated idea for a "non-techy" person.
You could protect your code a little bit and only distribute the compiled version.
 

AHH, i found them, on my system if you follow the path you sugessted B

Dabbler you arrive at indicators, however they are not present there, but, just below the task bar i seen an clicked on "compatibility files" and bingo!!.

So I have found the ex4, so now what i would do is send the file to a candidate via email etc.., they would then open and place the file in C:\Program Files\MetaTrader\experts\indicators and this would work, I assume they would have the boxes ticked to receive imports etc..

Thanks guys for the input

Reason: