Can users define theire own functions and call them in Custome Indicators?

 
if it is available, would you please propose an example about it?
my main concern is the format of it.

thank you!