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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi All,
I am using iSAR function in my EA to get the SAR value of last 3 bars. Here is the code I am using.
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?