| 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 |
namespace QuantConnect
{
using System.Drawing;
public class IndicatorSuiteAlgorithm : QCAlgorithm
{
string _symbol = "MSFT";
Series srOrder;
//Initialize the data and resolution you require for your strategy:
public override void Initialize()
{
//Initialize
SetStartDate(2016, 1, 10);
SetEndDate(2016, 1, 20);
SetCash(25000);
//Add as many securities as you like. All the data will be passed into the event handler:
AddSecurity(SecurityType.Equity, _symbol, Resolution.Second);
//Set up Indicators:
Chart stockPlot = new Chart("Trade Plot");
srOrder = new Series("Price", SeriesType.Candle, "$", Color.Azure);
stockPlot.AddSeries(srOrder);
AddChart(stockPlot);
}
public void OnData(TradeBars data)
{
var data2 = data[_symbol];
//Debug(string.Format("time={0}, open={1}, close={2}, high={3}, low={4}", Time, data2.Open, data2.Close, data2.High, data2.Low));
srOrder.AddPoint(Time, data2.Price);
//Plot("Trade Plot", "Price", data2.Price);
}
}
}