Hi Guys,
I am trying to understand the basic algorithm used for implementing automated trading systems.
I have heard that it is best implemented as producer/consumer pattern but I am not able to get it right in code.
As I understand, continuous stream of data acts as producer. My doubts are:
1. How to implement consumer?
2. Is it going to create a new consumer thread everytime there is a tick update received?
3. Producer thread never blocks as it is real time data. What algo to follow so that code is synchronized?
If someone can give me basic steps of algorithm/sudocode then it will be great.
Cheers,
Mich
I am trying to understand the basic algorithm used for implementing automated trading systems.
I have heard that it is best implemented as producer/consumer pattern but I am not able to get it right in code.
As I understand, continuous stream of data acts as producer. My doubts are:
1. How to implement consumer?
2. Is it going to create a new consumer thread everytime there is a tick update received?
3. Producer thread never blocks as it is real time data. What algo to follow so that code is synchronized?
If someone can give me basic steps of algorithm/sudocode then it will be great.

Cheers,
Mich