Back

Build Error after cloning the Five Minute Bar Generator

I cloned the 5.1.4 Five Minute Bar Generator example algorithm. But when I try to execute I am getting the following build error.

"2 | 22:12:45:
Build Error: File: Main.cs Line:25 Column:29 - 'QCUFiveMinuteBars.OnTradeBar(Dictionary)': no suitable method found to override"

Any suggestion on how I can resolve the issue.

Update Backtest








I apologize if this is a useless suggestion, but I've noticed that most problems of that nature go away if you specify the master as the current build, rather than an older deployment. This will ensure you have the most up to date version of LEAN, and thus newer algos (not sure if that particular algo is new or not) that have newer method implementations will work properly.

1

Thank you. When I did a quick google on the OnTradeBar I found the following information.
[Obsolete("'override void OnTradeBar' method is obsolete, please use 'void OnData(TradeBars data)' instead")] public virtual void OnTradeBar( ...
When I changed the "public overrride void" to "public virtual void" the error went away.
The example in the website can be changed if the old function is obsolete.

0

Thanks @Anand, we try to keep the collection up to date. What was the name of the QCU algorithm? I can't see it in the QCU Collection.

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.


The path of the example algorithm which I cloned is given below.
Documentation >> Example Algorithms >> 5.1.4 Five Minute Bar Generator

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