The System.IO is not permit in algorithm why ?
The sample in Rest Api use the System.IO.MemoryStream
///
/// When we have a new event trigger, buy some stock:
///
public List
{
List
byte[] rawData = null;
string line;
using (var wc = new System.Net.WebClient())
rawData = wc.DownloadData(url);
MemoryStream stream = new MemoryStream(rawData);
using (StreamReader sr = new StreamReader(stream))
{
sr.ReadLine();
while ((line = sr.ReadLine()) != null)
{
Weather w = new Weather(line);
events.Add(w);
if (w.errString != "")
Debug("Weather Err:" + w.errString);
}
}
return events;
}
How to find a solution ?
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ryan Rahmati
this thread is for 2014, and still simple reading csv file using streamReader is an issue.
It mentioned the CSVHelper v19 is already added but CSVHelper works with streams which is coming from System.IO
Ysos
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!