| Overall Statistics |
|
Total Trades 2 Average Win 0% Average Loss -6.01% Compounding Annual Return -40.938% Drawdown 6.000% Expectancy -1 Net Profit -6.015% Sharpe Ratio -2.584 Loss Rate 100% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.755 Beta 22.792 Annual Standard Deviation 0.154 Annual Variance 0.024 Information Ratio -2.685 Tracking Error 0.154 Treynor Ratio -0.018 Total Fees $0.00 |
namespace QuantConnect.Algorithm.CSharp
{
/// <summary>
/// Basic template algorithm simply initializes the date range and cash. This is a skeleton
/// framework you can use for designing an algorithm.
/// </summary>
public class BasicTemplateAlgorithm : QCAlgorithm
{
//private Symbol _spy = QuantConnect.Symbol.Create("KH33HKD", SecurityType.Cfd, Market.Oanda);
/// <summary>
/// Initialise 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(2016, 11, 10); //Set Start Date
SetEndDate(2016, 12, 22); //Set End Date
SetCash(100000); //Set Strategy Cash
// Find more symbols here: http://quantconnect.com/data
// Forex, CFD, Equities Resolutions: Tick, Second, Minute, Hour, Daily.
// Futures Resolution: Tick, Second, Minute
// Options Resolution: Minute Only.
AddSecurity(SecurityType.Cfd,"HK33HKD", Resolution.Minute, Market.Oanda, true, 100, false);
// There are other assets with similar methods. See "Selecting Options" etc for more details.
// AddFuture, AddForex, AddCfd, AddOption
Schedule.On(DateRules.On(2016,12,12),TimeRules.At(2, 30), () =>
{
Log("marketorder");
var t = MarketOrder("HK33HKD", 45);
StopMarketOrder("HK33HKD", -45,22837.3m);
Log(string.Format("{0}",Time));
});
}
/// <summary>
/// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
/// </summary>
/// <param name="data">Slice object keyed by symbol containing the stock data</param>
public override void OnData(Slice data)
{
}
}
}