public void SaveData(JobbingStockBase stockBase, OrderMode orderMode, int quantity, decimal price, DateTime dtTime)
        {
            if (!Directory.Exists(stockBase.SaveDirectoryName))
            {
                Directory.CreateDirectory(stockBase.SaveDirectoryName);
            }

            var    dateDir = string.Format("{0}_{1}_{2}", dtTime.Year, dtTime.Month, dtTime.Day);
            string dirPath = stockBase.SaveDirectoryName + "\\" + dateDir;

            if (!Directory.Exists(dirPath))
            {
                Directory.CreateDirectory(dirPath);
            }

            string fileName   = string.Format("{0}_{1}", stockBase.Exchange, stockBase.Symbol);
            string dataToSave = string.Format("{0}${1}${2}${3}\r\n", orderMode, quantity, price, dtTime.ToString());

            string filePath = dirPath + "\\" + fileName;

            if (File.Exists(filePath))
            {
                using (var writer = File.AppendText(filePath))
                {
                    writer.Write(dataToSave);
                }
            }
            else
            {
                File.WriteAllText(filePath, dataToSave);
            }
            //string format = "{0}:{1}$
        }
        public void Start(JobbingStockBase stockBase, KiteConnect.Kite kite)
        {
            if (stockBase.Status == JobbingStatus.NotStarted)
            {
                var clonedObject = stockBase.CloneObject() as JobbingStockBase;
                if (!_jobbingStocks.Any(s => s.Symbol == clonedObject.Symbol && s.Exchange == clonedObject.Exchange))
                {
                    _jobbingStocks.Add(clonedObject);
                }


                var stock = _jobbingStocks.FirstOrDefault(s => s.Symbol == clonedObject.Symbol && s.Exchange == clonedObject.Exchange);
                if (stock != null)
                {
                    stock.Start(kite);
                }
            }
            else
            {
                Stop(stockBase.Symbol, stockBase.Exchange);
            }
        }
 public void AddStocks(JobbingStockBase stockBase)
 {
 }