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 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 |
namespace QuantConnect { // // Make sure to change "BasicTemplateAlgorithm" to your algorithm class name, and that all // files use "public partial class" if you want to split up your algorithm namespace into multiple files. // //public partial class BasicTemplateAlgorithm : QCAlgorithm, IAlgorithm //{ // Extension functions can go here...(ones that need access to QCAlgorithm functions e.g. Debug, Log etc.) //} //public class Indicator //{ // ...or you can define whole new classes independent of the QuantConnect Context //} }
namespace QuantConnect { public class BasicTemplateAlgorithm : QCAlgorithm { public override void Initialize() { SetStartDate(2015, 12, 14); SetStartDate(2015, 12, 15); SetCash(25000); AddSecurity(SecurityType.Equity, "SPY", Resolution.Tick); } private int Index = 0; public void OnData(Ticks data) { if (++Index > 1) { return; } foreach (var tick in data) { var aTick = tick.Value.First(); Debug(string.Format("{0}, {1}, {2}", aTick.Price, aTick.AskPrice, aTick.BidPrice)); } } } }