how to use TrailingMA.mph?

 

i wish to include this file TrailingMA.mph in my auto-trading

how to initial its function?

[Deleted]  
wong cm: i wish to include this file TrailingMA.mph in my auto-trading. how to initial its function?

You need to to use the #include compiler directive to include the code in the compilation process.

Making use of the contents of the file, however, requires that you understand how to it functions.

Documentation on MQL5: Language Basics / Preprocessor / Including Files (#include)
Documentation on MQL5: Language Basics / Preprocessor / Including Files (#include)
  • www.mql5.com
Including Files (#include) - Preprocessor - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
WONGCM:

i wish to include this file TrailingMA.mph in my auto-trading

how to initial its function?

Oh. I was searching for the same thing...

It is too specific to use it just like this. Because of overcoupling and overcapsulating it can only be used in generated EAs, in which it seems to work just fine. 

You can still generate an EA with the TrailingMA functionality and try to reduce it until only the desired functionality is left, but you will soon see that it is specifically coded to be Added to a full blown CExpert EA.

The idea is still good if you can use Cima pointers, you might find a workaround.