Hi,
I'm using a renko consolidator with 0.1 price changes and second resolution data. I't seems that the open and closing price for the consolidator are being rounded to the nearest cent. Is there a way to make it more precise?
QUANTCONNECT COMMUNITY
Hi,
I'm using a renko consolidator with 0.1 price changes and second resolution data. I't seems that the open and closing price for the consolidator are being rounded to the nearest cent. Is there a way to make it more precise?
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.
Mia Alissi
Yes, you can make the open and closing price of the Renko bars more precise by disabling the
evenBars
argument in theClassicRenkoConsolidator
constructor. WhenevenBars
is disabled, the open value of the first Renko bar is set to the first value from theselector
. The following opening and closing Renko bar values are all multiples of the first value from theselector
.Here is how you can do it in Python:
Remember to add an event handler to the consolidator:
And define the consolidation handler:
Please note that the most common error when creating consolidators is to put parenthesis
()
at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. So, remember to pass the name of your method to the event system. Specifically, it should beself.consolidation_handler
, notself.consolidation_handler()
.Source: Classic Renko Consolidators
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.
Renata
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!