mathpaquette / IQFeed.CSharpApiClient

IQFeed.CSharpApiClient is fastest and the most well-designed C# DTN IQFeed socket API connector available
MIT License
120 stars 43 forks source link

Barcreatation bug #111

Closed NichUK closed 3 years ago

NichUK commented 3 years ago

@mathpaquette

OK, I found and fixed the bar problem.

There was an edge case, where if at the beginning of a day there were several 'O' ticks, they were just disgarded, whereas actually the volume should have been counted in TotalVolume to match the interval data downloaded from IQ.

I re-wrote the bar conversion algo slightly to make this happen, and commented my changes.

The test now passes both on the master branch, and also when applied to the 6.1 branch, so if you apply this fix, then I can rebase protocol_6.1_new and we should be good to go! :)

mathpaquette commented 3 years ago

@NichUK good catch, I know what you mean!

mathpaquette commented 3 years ago

I have to say, this is good stuff. I really appreciate your effort digging into that.

also, I feel that your version is more readable in some degree. its more explicit...

NichUK commented 3 years ago

Thanks!

Like I said before, I've been using this stuff for a year now, so happy to contribute back a bit. :)