/// <summary> /// Initialize the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized. /// </summary> public override void Initialize() { SetStartDate(2013, 10, 07); //Set Start Date SetEndDate(2013, 10, 11); //Set End Date SetCash(100000); //Set Strategy Cash // Find more symbols here: http://quantconnect.com/data AddSecurity(SecurityType.Equity, "SPY", Resolution.Second); // there's two ways to set your brokerage model. The easiest would be to call // SetBrokerage( BrokerageName ); // BrokerageName is an enum //SetBrokerageModel(BrokerageName.TradierBrokerage); //SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage); //SetBrokerageModel(BrokerageName.Default); // the other way is to call SetBrokerage( IBrokerageModel ) with your // own custom model. I've define a simple extension to the default brokerage // model to take into account a requirement to maintain 500 cash in the account // at all times BrokerageModel = new MinimumAccountBalanceBrokerageModel(this, 500.00m); }
/// <summary> /// Initialize the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized. /// </summary> public override void Initialize() { SetStartDate(2013, 10, 07); //Set Start Date SetEndDate(2013, 10, 11); //Set End Date SetCash(100000); //Set Strategy Cash // Find more symbols here: http://quantconnect.com/data AddSecurity(SecurityType.Equity, "SPY", Resolution.Second); // there's two ways to set your brokerage model. The easiest would be to call // SetBrokerage( BrokerageName ); // BrokerageName is an enum //SetBrokerageModel(BrokerageName.TradierBrokerage); //SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage); //SetBrokerageModel(BrokerageName.Default); // the other way is to call SetBrokerage( IBrokerageModel ) with your // own custom model. I've define a simple extension to the default brokerage // model to take into account a requirement to maintain 500 cash in the account // at all times BrokerageModel = new MinimumAccountBalanceBrokerageModel(this, 500.00m); }