Overall Statistics |
Total Trades 4 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 $396.75 Estimated Strategy Capacity $260000.00 Lowest Capacity Asset SSP R735QTJ8XC9X |
using QuantConnect.Algorithm.Framework.Execution; namespace QuantConnect.Algorithm.CSharp { public class EnergeticBlackDog : QCAlgorithm { string symbol = "SSP"; public override void Initialize() { SetStartDate(2007, 2, 2); SetEndDate(2007, 2, 5); SetCash(100000); AddEquity(symbol, Resolution.Minute); SetExecution(new SpreadExecutionModel(0.001m)); } public override void OnData(Slice data) { var bar = data.Bars[symbol]; if (!Portfolio.Invested && bar.EndTime.Hour != 16) { SetHoldings(symbol, 1); } else if (bar.EndTime.Hour == 15 && bar.EndTime.Minute == 59) { Liquidate(); } } } }