Moving average on indicators in EA

 
Let's say I want to do a moving average on a Stochatic indicator. I know how to overlay on the chart using the "use on : Previous indicator" option. How do I get this same type of thing if I want to see the moving average in an EA? Thanks in advance.
 
iMAOnArray for example. See for example MACD custom indicator
Reason: