iMA: Not sure what the last 'int shift' variable does AND how to find the value of iMA for (the) previous bar(s)

 

Help please,

I’m trying to figure out what the last variable: "int shift" in the iMA functions does?

Also I want to know how to find the iMA value for (the) previous bar(s)

I have a hunch that these two are related and that this ‘shift’ function does just that: provides the iMA value of (the) previous bar(s) but as I stated I am unclear and unsure on this.

Thanks

 
I beleive I have found confirmation of this in https://www.mql5.com/en/forum/115736
I would appreciate someone checking this and confirm it for me and let me know. Thanks