Hiding functions from source codes

 

HI.. good day to you all..

Am not sure if tis is possible 

is there a way to hide functions from source code.. .mq5 or mq4  

eg.

void TrailingStop()

  {

//Trailing code

}

or instead calling it from a private website codes..

 eg.

void TrailingStop()

  {

//get Trailing code function from my website.. functiontrailing();

}

Thanks..

 

Abubakar Saidu: is there a way to hide functions from source code.. .mq5 or mq4  

or instead calling it from a private website codes..

  1. It's not possible. The compiler must see all your code to compile it.
  2. The data used can be read from elsewhere, but if you have to ask № 1, you are way over your head.
 

I don't think that is possible.

Your closest shot is embedding private functions in a dll.

 
Raymond Ogechukwu Omeh:

I don't think that is possible.

Your closest shot is embedding private functions in a dll.

Hi.. ooh thanks will look at it.. which is the best dll article to look at.. there are lots of them

 
Abubakar Abu Saidu: is there a way to hide functions from source code.. .mq5 or mq4

Do you want to provide source code without providing it, or what's the point? The easiest way to hide part of your source code is to not provide the source code at all.

Sure, you can use a dll or a compiled library file, but isn't it easier to just not provide the source code? Providing source code but hiding part of it looks like an attempt to deceive (you pretend that you provided the source code, but in fact you didn't).

Vladislav Boyko #: a compiled library file

https://www.mql5.com/en/docs/basis/function/export

https://www.metatrader5.com/en/metaeditor/help/development/generate_mqh

If you promise to provide source code, but some of it is in closed libraries, then this is fraud (unless you explicitly state that some of the source code will not be provided).