May I have trailing stop function for EA in MQL4?

 

I looked lots of trailing stop EA, but I just need a function which does not need any global variable and methods.

Is there any trailing stop function that I can easily use it by calling?

There should be a parameter to put magic number in the function.