how to code a 2 bar MA of ATR18

 

I placed ATR on my chart with 18 periods. Then I drug Moving Average onto this indicator window, set it to 2 periods, and then told it to apply it to "Previous Indicator's Data".

I want to use the gap between these 2 lines in EA logic, but I cannot figure out how to code the 2-bar MA of ATR in the EA. Can anyone help with the iMA definition for this? Thanks in advance!