O.k. I know how to find the Open and Close of a previous candle, let's say, the 54th candle from current. But, how would I find the value of a simple moving average of that same candle / period? I can bring into my EA the current value of a SMA with iCustom, but not sure how to bring in a past value of a specific candle / period.
ObjectSet("ArrowUpMa", OBJPROP_COLOR, Lime);
Thanks! That got me part way. mz is the point / candle, where I'm trying to find the value of the MA . The value that I get is 1.36040. But when I attempt to draw a line at it's location, on my chart, the line is drawn at 1.37521. Not sure why that is?
It's unfortunate that the word shift is used in the 4th and last parameter
mz is the Ma shift parameter, i is the bar shift
the value of a 14 period SMA of the Close prices at candle 54 is iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,54);
To add comments, please log in or register