1 Star 0 Fork 1

vv_soft/Lean

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
BasicTemplateAlgorithm.java 852 Bytes
Copy Edit Raw Blame History
snugs authored 2015-11-12 09:41 +08:00 . Fixes build on Java/Python projects
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(Symbol("SPY"), 1, false);
Debug("Hello From Java");
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/dahuotou/Lean.git
git@gitee.com:dahuotou/Lean.git
dahuotou
Lean
Lean
master

Search