Hello all,

 

I've been tryin to read text from a csv file I uploaded to dropbox

the code i have so far is attached below.

I dont know how to use the vatinant "file" - it seems to be in html data format.

can someone tell me how to read text from variant "file" or attach a working example of suce code?

thanks!

using System; using System.Collections.Concurrent; using System.Linq; using QuantConnect.Data.Market; using QuantConnect.Data.UniverseSelection; using QuantConnect.Indicators; using System.Collections.Generic; namespace QuantConnect.Algorithm.CSharp { public class EmaCrossUniverseSelectionAlgorithm : QCAlgorithm { // tolerance to prevent bouncing const decimal Tolerance = 0.1m; private const int Count = 100000; // use Buffer+Count to leave a little in cash private const decimal TargetPercent = 0.1m; private SecurityChanges _changes = SecurityChanges.None; TradeBar open; // we'll set the close at the end of each day TradeBar spyVal; Dictionary<string, decimal> DayOpenValues = new Dictionary<string, decimal>(); Dictionary<string, decimal> ValuesAtNoon = new Dictionary<string, decimal>(); // class used to improve readability of the coarse selection function OrderTicket _limitTicket; OrderTicket _TakeProfit; OrderTicket _liquidateTicket1; public override void Initialize() { //UniverseSettings.Leverage = 2.0m; UniverseSettings.Resolution = Resolution.Daily; SetStartDate(2020, 04, 01); SetEndDate(2021, 01, 01); SetCash(6000); AddEquity("SPY", Resolution.Minute); } public void OnData(TradeBars data) { var file = Download("https://www.dropbox.com/preview/Programming/nasdaq_screener_1611568528773.csv?role=personal&dl=1"); } } }