| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 58.586% Drawdown 0.000% Expectancy 0 Net Profit 0.285% Sharpe Ratio 6.322 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 17.339 Annual Standard Deviation 0.028 Annual Variance 0.001 Information Ratio 5.981 Tracking Error 0.028 Treynor Ratio 0.01 Total Fees $0.00 |
using QuantConnect.Data;
using System;
namespace QuantConnect.Algorithm.CSharp
{
/// <summary>
/// Algorithm demonstrating FOREX asset types and requesting history on them in bulk. As FOREX uses
/// QuoteBars you should request slices or
/// </summary>
/// <meta name="tag" content="using data" />
/// <meta name="tag" content="history and warm up" />
/// <meta name="tag" content="history" />
/// <meta name="tag" content="forex" />
public class NoTimeZoneEurusdFxcm : QCAlgorithm
{
/// <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(2018, 9, 5);
SetEndDate(2018, 9, 6);
SetCash(100000);
SetTimeZone( "Europe/London" );
AddForex("EURUSD", Resolution.Daily, Market.FXCM);
}
/// <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)
{
if (!Portfolio.Invested)
{
SetHoldings("EURUSD", 1);
Log(Time.ToString());
Log(ActiveSecurities["EURUSD"].LocalTime.ToString());
}
}
}
}