Hi Folks,
I created this little C# project to see if I would have any troubles pulling down streaming 1 minute bars for 100 stocks simultaneously. So far, I am having no problems. The code sends 100 RequestHistory calls without waiting for any of the calls to return. It then populates a grid with the OHLCV and time as each OnBarReceived or OnBarChanged comes in.
I am running it right now (have been for about 10 minutes now) and it is humming away nicely. It is lunchtime, so the stream coming in is going to be slower than at the open. I'll have to try it then as well. Currently the program is consuming about an average of 12% of my CPU time (on an Athlon 2800). I have hit peaks of 53% so far.
BTW, this is a single threaded app, so the grid redraws are occuring interleaved with the reception of the bars. With a batched grid update we could probably squeeze a little more performance out of it, but it seems to be working well enough for this test so far.
BTW, if you are going to test performance, be sure to do it on a "Release" build.
Project files attached...
Cheers... George
I created this little C# project to see if I would have any troubles pulling down streaming 1 minute bars for 100 stocks simultaneously. So far, I am having no problems. The code sends 100 RequestHistory calls without waiting for any of the calls to return. It then populates a grid with the OHLCV and time as each OnBarReceived or OnBarChanged comes in.
I am running it right now (have been for about 10 minutes now) and it is humming away nicely. It is lunchtime, so the stream coming in is going to be slower than at the open. I'll have to try it then as well. Currently the program is consuming about an average of 12% of my CPU time (on an Athlon 2800). I have hit peaks of 53% so far.
BTW, this is a single threaded app, so the grid redraws are occuring interleaved with the reception of the bars. With a batched grid update we could probably squeeze a little more performance out of it, but it seems to be working well enough for this test so far.
BTW, if you are going to test performance, be sure to do it on a "Release" build.
Project files attached...
Cheers... George
Comment