how to use indicator in ea

 
can I  use an indicator's logic in an EA ? for example : i want to create an EA buy when 10 EMA cross above 20 EMA , I dont have to rewrite the whole EMA caculation instead to call the EMA paramters from EMA indicator. that way I dont have to rewrite EMA inside the EA and shorter my programming time.
 

The time you spent writing and posting this rambling question could have been better spent writing and testing your idea instead.

So just do it!

 

do you know what i saying ? my english not good  and wanting to learn , this is not an idea, but suppose have in mt5

 
the longer it get's the more you will learn.
 
Documentation on MQL5: Technical Indicators / iMA
Documentation on MQL5: Technical Indicators / iMA
  • www.mql5.com
Technical Indicators / iMA - Reference on algorithmic/automated trading language for MetaTrader 5
 
Google for iCustom() function
Reason: