Closed ianhendry closed 3 years ago
Hi, Thank you for your suggestion. It is true that in many cases probably the finished bar is more interesting. We will keep it as it is for now to keep the consistency. People who need the last bar can use your solution.
This is not an issue per se but I want to leave it here in case others find the same thing I did. If using the subscriber to get OHLC bar data the implementation provided sends the data of the new bar not the last completed bar. You will see this because after the first response all subsequent published bars have bar volume =1. My requirement for this type of functionality is to send the data for the last complete bar just after it has been completed. Should you wish to move to this implementation the change required is as per below:
where the 0 (zero) in the return CopyRates has been replaced with 1 (one)
This will send the data for the last formed bar on the first tick of the next bar