Shift when adding an indicator

derrick calderon
19
derrick calderon  
Okay so when I add a moving average indicator to my chart I can set the shift to -1 and it will give me a value for the MA, which is perfect for what I want, however when I try to program a -1 shift in the iMA function in my EA, the value comes back as zero. How can I overcome this?