Closed jaredbroad closed 8 years ago
namespace QuantConnect
{
public class SPXLDemo : QCAlgorithm
{
//Initialize the data and resolution you require for your strategy:
public override void Initialize()
{
SetStartDate(2010, 1, 1);
SetEndDate(DateTime.Now.Date.AddDays(-1));
SetCash(25000);
AddSecurity(SecurityType.Equity, "SPXL", Resolution.Minute);
}
public void OnData(TradeBars data)
{
if (!Portfolio.HoldStock)
{
Order("SPXL", 100);
}
}
}
}
With map file:
20081105,bgu 20120628,bgu 20501231,spxl
The SPXL is delisting instead of mapping the symbol to its new file.