I can't create renko bars from Ticks, it only works by consolidating Minutes data...
Am I missing something ?
QUANTCONNECT COMMUNITY
I can't create renko bars from Ticks, it only works by consolidating Minutes data...
Am I missing something ?
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.
Hans peter
This is the code I tried:
namespace QuantConnect { public class RenkoAlgorithm : QCAlgorithm { public override void Initialize() { // cash allocation SetCash(25000); SetStartDate(2017, 03, 07); SetEndDate(2017, 03, 08); AddForex("EURUSD", Resolution.Tick); var renkoClose = new RenkoConsolidator(0.0001m); renkoClose.DataConsolidated += (sender, consolidated) => { // call event handler for renko data HandleRenkoClose(consolidated); }; SubscriptionManager.AddConsolidator("EURUSD", renkoClose); } private void HandleRenkoClose(RenkoBar data) { Console.WriteLine("CLOSE - {0} - {1} {2}", data.Time.ToString("o"), data.Open, data.Close); } public override void OnData(Slice data) { // slice has lots of useful information //if (!data.ContainsKey("EURUSD")) return; //Ticks theticks = data.Ticks; Plot("EURUSD", "Price", data["EURUSD"].Price); } } }
Alexandre Catarino
We can only consolidate RenkoBar from TradeBar or QuoteBar, since we need bar characteristics (open and close).
Hans peter
Thank you for your reply. In my mind the whole point of priced based bars (range/renko/p&f) is that they are NOT time based...but if quantconnect uses time based underlying bars with open and close to construct them then thay are not truly price bars. As a work around - what is the smallest time interval that I can construct a TradeBar at (1 min, 1 sec, 1 millisecond ?) Thanks.
Alexandre Catarino
Our tick data is timestamped by the second (all ticks within a second have the same datetime), so you should use second resolution data.
Stefano Raggi
hans peter You're right, it's a bug in the RenkoConsolidator, we'll release a fix shortly.
Jared Broad
The fix was merged this morning. You should be able to use tick data for Rekno consolidators in your algorithms now.
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.
Hans peter
OK Thank you for a fast response - I will test.
Hans peter
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!