/// <summary>
 /// Event Handler for Nifty Data Events: These Nifty objects are created from our
 /// "Nifty" type below and fired into this event handler.
 /// </summary>
 /// <param name="data">One(1) Nifty Object, streamed into our algorithm synchronised in time with our other data streams</param>
 public void OnData(DollarRupee data)
 {
     _today = new CorrelationPair(data.Time)
     {
         CurrencyPrice = Convert.ToDouble(data.Close)
     };
 }
        /// <summary>
        /// Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object
        /// each time it is called.
        /// </summary>
        public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
        {
            //New USDINR object
            var currency = new DollarRupee();

            try
            {
                var data = line.Split(',');
                currency.Time   = DateTime.Parse(data[0], CultureInfo.InvariantCulture);
                currency.Close  = Convert.ToDecimal(data[1], CultureInfo.InvariantCulture);
                currency.Symbol = "USDINR";
                currency.Value  = currency.Close;
            }
            catch
            {
            }
            return(currency);
        }