But, while loading the history for the first time, the last current bar is always “BARINDEX”, but we have no possibility to know if this barindex is currently the real actual LIVE one (current time I mean.. hope it makes sense?).
I tried your code and now the segment is refreshed!
I am adding +010000 because ProrealTime is installed on IG UK while my computer is in Germany (I work in Remote Deesktop) and there is one hour difference.