| Overall Statistics |
|
Total Trades 0 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 0% Expectancy 0 Net Profit 0% Sharpe Ratio 0 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0 Annual Variance 0 Information Ratio 0 Tracking Error 0 Treynor Ratio 0 Total Fees $0.00 |
using MathNet.Numerics;
namespace QuantConnect
{
public class BasicTemplateAlgorithm : QCAlgorithm
{
// The majority of cross minutely data seems to be unavailable
// GBPUSD works
// EURGBP doesnt
public string pair1 = "TRYJPY";
int holdHours = 0;
BollingerBands bb;
public override void Initialize()
{
SetStartDate(2016,01,01);
SetEndDate(2016, 12, 12);
//SetBrokerageModel(BrokerageName.FxcmBrokerage);
SetBrokerageModel(BrokerageName.OandaBrokerage);
SetCash(10000);
//AddForex(pair1, Resolution.Minute, Market.Oanda);
AddForex(pair1, Resolution.Minute, Market.Oanda);
bb = BB(pair1, 40, 1.0M, MovingAverageType.Simple, Resolution.Minute);
}
public void OnData(TradeBars data) {
var close = (double)data[pair1].Close;
// Entry
if(!Portfolio.Invested){
SetHoldings(pair1, 1);
}
else{
Liquidate();
}
}
public override void OnEndOfDay()
{
Plot("TRYJPY", "EOD", Securities["TRYJPY"].Close);
}
}
}