Exemple #1
0
        public void GetMarketData(MarketData marketData)
        {
            Console.WriteLine("Got new MarketData. Publishing OptionData");
            var options = publisher.GetAllOptions();
            var result  = new Result();

            result.Delta = 0.3;
            result.Value = 500;
            x           += 100;

            var optionResults = new OptionResult[options.Length];

            for (var i = 0; i < options.Length; i++)
            {
                var oResult = new OptionResult()
                {
                    Contract   = options[i],
                    BaseResult = result
                };
                optionResults[i] = oResult;
            }

            OptionData newOptionData = new OptionData()
            {
                MarketData    = marketData,
                OptionResults = optionResults
            };


            publisher.PublishUIData(newOptionData);
        }
 public List <OptionContract> GetAllOptions()
 {
     return(client.GetAllOptions().ToList());
 }