Example #1
0
        /// <summary>
        /// Starts the simulation.
        /// </summary>
        internal static void Start()
        {
            // The price table on the server has a volatile price table.  Therefore, the prices will all be zero (and any market values based off those prices will
            // be zero) until prices are loaded.  This provides the initial prices for the volatile price table.
            if (!PriceSimulator.arePricesInitialized)
            {
                PriceSimulator.InitializeCurrencyPrice();
                PriceSimulator.InitializeEquityPrice();
                PriceSimulator.InitializeDebtPrice();
                PriceSimulator.arePricesInitialized = true;
            }

            // This will start the price simulator.
            PriceSimulator.priceSimulationThread      = new Thread(new ThreadStart(PriceSimulator.SimulatePrice));
            PriceSimulator.priceSimulationThread.Name = "Price Simulator";
            PriceSimulator.priceSimulationThread.Start();
        }