title: C# Algorithmic Stock Trading
body: <p>We are working on a Algorithmic trading software in C#. We monitor Market Price and then based on certain conditions, we want to buy the stock.</p>
  
  <p>User input can be taken from GUI (<code>WPF</code>) and send to back-end for monitoring.</p>
  
  <p>Back - end receives data continuously from Stock Exchange and checks if user entered price is met with certain limits and conditions. If all are satisfied, then we will buy / sell the stock (in Futures FUT).</p>
  
  <p>Now, I want to design my Back end service.</p>
  
  <ol>
  <li>I need Task Parallel Library or Custom Thread Pool where I want to create my tasks / threads / pool when application starts (may be incremental or fixed say 5000).</li>
  <li>All will be in waiting state. </li>
  <li>Once user creates an algorithm, we will activate one thread from the pool and monitors price for each incoming string. If it matches, then buy / sell and then go into waiting state again. (I don't want to create and destroy the threads / tasks as it is time consuming).</li>
  </ol>
  
  <p>So please can you guys help me in this regard? If the above approach is good or do we have any other approach?</p>
  
  <p>I am struck with this idea and not able to go out of box to think on this.</p>