Back

Intraday Charts? (Sept. 2016)

I still can't find any method for displaying intraday charts.  I've cloned all of the applicable sample code, and even the sample project from a post in 2015.

Even the 2015 'Intraday Charts?' post  appears limited to day/week/month.

"  public class IntradayChartExample : QCAlgorithm"

I've tried setting the date range to 1 day or 2 days.

Is there something I'm missing?

 

Update Backtest








Hi Keith,
Please checkout the docs in the Charting section:

// In your initialize method:

// Chart - Master Container for the Chart:
var stockPlot = new Chart("Trade Plot");
// On the Trade Plotter Chart we want 3 series: trades and price:
var buyOrders = new Series("Buy", SeriesType.Scatter, 0);
var sellOrders = new Series("Sell", SeriesType.Scatter, 0);
var assetPrice = new Series("Price", SeriesType.Line, 0);
stockPlot.AddSeries(buyOrders);
stockPlot.AddSeries(sellOrders);
stockPlot.AddSeries(assetPrice);
AddChart(stockPlot);

// Later in your OnData(Slice data):
Plot("Trade Plot", "Price", data.Bars["SPY"].Close);


I attached an algorithm where you can see the snipped above in action.
 

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Ahh ok thanks Alexandre!  I am now able to see at least zoom the "Trade Plot" with intraday points for the 1st day out of the 20 days of Sept.  At least part of my problem may be a browser/refresh issue?

The "Strategy Equity" plot still has no intraday plotted points overlayed over the candlestick chart, but I think there is something I don't understand yet... will let you know if I can get that to work.

0

Hi Keith,

By default, we only have a chart for daily strategy equity chart.
We can add another chart for intraday equity by the same process: 

// In your initialize method:

// Chart - Master Container for the Chart:
var equityChart = new Chart("Daily Equity");
// On the Trade Plotter Chart we want one series: equity:
var equitySeries = new Series("Equity", SeriesType.Line, 0);
equityChart.AddSeries(equitySeries);
AddChart(equityChart);

// Later in your OnData(Slice data):
// Portfolio.TotalPortfolioValue is "Strategy Equity"
Plot("Daily Equity", "Equity", Portfolio.TotalPortfolioValue);

 

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed