Back

Request for CCI example, Universe example and algorithm trading example

Can anyone post any CCI example?

I have found CCI is different from other indicators.

For example I have got this error:

Runtime Error: CommodityChannelIndex does not support Update(DateTime, decimal) method overload. Use Update(IBaseDataBar) instead. (Open Stacktrace)

It will be nice to have an example, it is very difficult to find bit and piece information. 

Update Backtest







It seems that the error has come because CCI was not updated with an IBaseDataBar. The CommodityChannelIndex is calculated via:

CCI = (Typical Price - 20-period SMA of TP) / (.015 * Mean Deviation)
Typical Price (TP) = (High + Low + Close)/3

and the error above suggests that a decimal value was passed into the Update() method, not a TradeBar. 

1

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 Gurumeher, Thank you for your reply.

But how does CCI work with universe 

As far as I know, coarse does not have a property as TradeBar

Would you please give an CCI example on unverse ??

Thanks

0

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