By the GUI client, a new SAR value should be available just at the previous bar finished. But when I use Java Code, the value is delayed for one bar's time. If I use shift, the value would not be same as before. And the value of SAR is different when it change position from about to below the bar. How to fix it?
If none of these help, I suggest to create and upload a sample strategy that replicates your issue, and/or show some screenshots, as it is not exactly clear what is your actual problem...