I am using iSAR function in my EA to get the SAR value of last 3 bars. Here is the code I am using.
indsar_handle = iSAR(Symbol(),Period(),0.04,0.2);
if (indsar_handle > 0)
s0 = indSAR;
s1 = indSAR;
s2 = indSAR;
Ideally s0 should have the SAR value of current bar but when I run it, it shows the SAR value of previous bar and not current one. Same is the case with s1 and s2. Please see in the attached screenshot. The s0 at 00:15 is showing the SAR value of 00:00 which is previous bar.
Am I missing something in the code?