Exemplo n.º 1
0
        public Trading(Catalog.Specify specify) : base(specify)
        {
            foreach (Catalog.XingAPI.Quotes quotes in Retrieve.Quotes)
            {
                if (quotes.Price != null)
                {
                    Analysize(new Chart
                    {
                        Date   = long.Parse(quotes.Time),
                        Price  = double.Parse(quotes.Price),
                        Volume = int.Parse(quotes.Volume)
                    });
                }
            }
            if (specify.Time == 1440)
            {
                OnTime = true;
            }

            else
            {
                Check = string.Empty;
            }

            ((IEvents <Datum>)API.reals[1]).Send += Analysize;
        }
Exemplo n.º 2
0
 public Quotes(Catalog.Specify specify) : base(specify)
 {
     strategy             = specify.Strategy.Equals("TF");
     API.OnReceiveBalance = false;
     API.WindingClass     = string.Empty;
     ((IEvents <EventHandler.XingAPI.Quotes>)API.reals[0]).Send += OnReceiveQuotes;
 }