Added Java Support
Added Java Support for QuantConnect
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package QuantConnect;
|
||||
import cli.QuantConnect.Resolution;
|
||||
import cli.QuantConnect.SecurityType;
|
||||
import cli.QuantConnect.Algorithm.QCAlgorithm;
|
||||
import cli.QuantConnect.Data.Market.TradeBars;
|
||||
|
||||
public class BasicTemplateAlgorithm extends QCAlgorithm{
|
||||
public 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.wrap(SecurityType.Equity), "SPY", Resolution.wrap(Resolution.Second),true,false);
|
||||
}
|
||||
|
||||
public void OnData(TradeBars data)
|
||||
{
|
||||
if (!get_Portfolio().get_Invested())
|
||||
{
|
||||
SetHoldings("SPY", 1, false);
|
||||
Debug("Hello From Java");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user