1) Create the chart shown, don't forget to select the CME US Index Futures ETH session template
2) Add the attached test script to the chart
3) Pan/rescale the chart to include the bars in the screen shot (or something close to it)
4) When the current session and part of the last session are visible GetBar(...) always returns the first bar of the current session no matter what time you pass as a parameter. Example output, which is not correct, see the times:
Asked for 10/29/2015 6:50:00 AM and got 10/29/2015 3:01:00 PM
GetBar() appears to work like expected otherwise - except in this particular scenario.
Comment