After making a request say for minute bars over a time range I thought I could use the OnBarsChanged to update the current bar and get new bars as time moves forward. But what I see is when OnBarsChanged is called is that it does not advance and keeps reporting the same old bars and does not report any bars past the time of my initial request for bars So my chart stops updating to the latest bar and does not advance... What am I doing wrong? Also why does OnBarsChange report more than one bar has changed when this is not the case?
For example if I make a request for one minute bars from say 9am to 10am at 10am, after I get the bars I see OnBarsChanged calls with bars from 9:45 to 10:00 as it updates the 10:00 bar... but then at 10:01 and later it just keeps calling OnBarsChanged with the bars from 9:45 to 10:00 which of course are not changing.... what I would like to see is... at 10:00, OnBarsChanged called with just the 10:00 bar as it updates and then at 10:01, just the 10:01 bar as it updates, etc... Is this possible?
For example if I make a request for one minute bars from say 9am to 10am at 10am, after I get the bars I see OnBarsChanged calls with bars from 9:45 to 10:00 as it updates the 10:00 bar... but then at 10:01 and later it just keeps calling OnBarsChanged with the bars from 9:45 to 10:00 which of course are not changing.... what I would like to see is... at 10:00, OnBarsChanged called with just the 10:00 bar as it updates and then at 10:01, just the 10:01 bar as it updates, etc... Is this possible?
Comment