Back

Different indicator values for same resolution using consolidators

Hi all,

i am trying to run some tests on custom time frames (4h, 8h, 12h etc.) using consolidators, but the indicator values differ for the same time resolution using consolidators vs. no consolidators. I have isolated the problem to this simple example, where i just create 2 EMA indicators on a 1 h time frame, one using a consolidator and the other one with no consolidator and log the their values, which are different.

Thanks for any feedback.

 

BR,

 

Simon

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.


If any one is interested in the solution - I needed to use the constructor for ExponentialMovingAverage instead of the factory method QCAlgorithm#EMA and after that the indicator values are the same.

// use constructor for ExponentialMovingAverage instead of QCAlgorithm#EMA
_fastEmaCustomTimeFrame = new ExponentialMovingAverage(_fastPeriod);
_fastEmaStandardResolution = EMA(_ticker, _fastPeriod, _resolution);

 

0

You're correct! The quant team wrote an answer to you but didn't post it! Sorry about that! 

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.


Hi Simon,

Thank you for the question and answer! You're correct that when working with consolidated data, we need to define a custom indicator instead of using the built-in one. I've attached a backtest to add more details to your answer.

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