Overall Statistics |
Total Trades 0 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 0% Expectancy 0 Net Profit 0% Sharpe Ratio 0 Probabilistic Sharpe Ratio 0% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0 Annual Variance 0 Information Ratio 0 Tracking Error 0 Treynor Ratio 0 Total Fees $0.00 |
using QuantConnect; using QuantConnect.Algorithm; using QuantConnect.Algorithm.Framework.Selection; using QuantConnect.Brokerages; using QuantConnect.Data; using QuantConnect.Data.Fundamental; using QuantConnect.Data.UniverseSelection; using QuantConnect.Indicators; using QuantConnect.Securities; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Drawing; using System.Linq; namespace QCDemo { public class RawDataFeedQuestion : QCAlgorithm { private int _startingCash = 200000; private Resolution _resolution = Resolution.Daily; public override void Initialize() { SetStartDate(2017, 1, 1); //Set Start Date SetEndDate(2018, 1, 3); SetCash(_startingCash); //Set Strategy Cash UniverseSettings.Resolution = Resolution.Daily; SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage); var symbols = new[] { QuantConnect.Symbol.Create("MSFT", SecurityType.Equity, Market.USA) }; AddUniverseSelection(new ManualUniverseSelectionModel(symbols)); SetSecurityInitializer(x => x.SetDataNormalizationMode(DataNormalizationMode.Raw)); Chart tradePlotter = new Chart("Prices"); tradePlotter.AddSeries(new Series("Price", SeriesType.Line, "$", Color.Red)); //foreach (SubscriptionDataConfig a in SubscriptionManager.Subscriptions) //{ // a.s == DataNormalizationMode.Raw; //} //SubscriptionManager.Subscriptions.DataNormalizationMode = DataNormalizationMode.Raw; // AddUniverse(MyCoarseFilterFunction); } public override void OnData(Slice data) { Plot("Prices", "Price", data["MSFT"].Price); } } }