Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return -7.549% Drawdown 0.100% Expectancy 0 Net Profit 0% Sharpe Ratio -11.99 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.063 Beta 0.134 Annual Standard Deviation 0.003 Annual Variance 0 Information Ratio -12.471 Tracking Error 0.019 Treynor Ratio -0.269 Total Fees $0.04 |
namespace QuantConnect { public class BasicTemplateAlgorithm : QCAlgorithm { private DateTime BuyDateTime = DateTime.Parse("2016-06-20T14:33:47.754Z"); public override void Initialize() { SetStartDate(2016, 6, 20); SetEndDate(2016, 6, 21); SetCash(25000); this.SetBrokerageModel(BrokerageName.FxcmBrokerage); AddSecurity(SecurityType.Forex, "EURUSD", Resolution.Tick); var consolidator = new TickConsolidator(1); consolidator.DataConsolidated += OnDataConsolidated; SubscriptionManager.AddConsolidator("EURUSD", consolidator); } public void OnDataConsolidated(object sender, TradeBar tradeBar) { if (!Portfolio.Invested) { var lastTick = Securities["EURUSD"].GetLastData() as Tick; var tag = string.Format("Price: {0}, Ask: {1}, Bid: {2}", lastTick.Price, lastTick.AskPrice, lastTick.BidPrice); Order("EURUSD", 1000, false, tag); } } } }