I need the full part of the iMA() function

 
Hi, i need the full function of iMA() especially the exponential moving average.I would like to study how a moving average is calculated so please give me the full iMA() function, thanks :)
 
  1. Use this and you would have found this
  2. Ignore SMMA code as SMMA(x) == EMA(2x-1)