LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
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 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.
Gurumeher Sawhney
16.5k
,
The stacktrace was not actually linked, so determining the problem will be a little tougher. Is the algorithm warming up the indicator before it is being used? The problem could be that ATR's value is currently 0 at that time. Check the documentation on warming up an algorithm: it pumps data in from before the start date for priming technical indicators, or populating historical data arrays. This sample code warms up an EMA so that it can be using during the start of the algorithm.
Subscribing to the renko consolidator after the init method by calling this function in OnData is a possible solution. I'm still fairly new to QC, it seems like its not possible to access historical data outside of OnData, even with a warmup period. Correct me if I'm wrong.
0
Gurumeher Sawhney
16.5k
,
Historical data can be accessed anywhere within the algorithm using the call self.History(), as long as the data being called has been subscribed. In this example, self.History() is called during Initialize() to manually feed data into the indicators.
0
Derek Rein
59
,
atr = AverageTrueRange(14)
for index, tradeBar in tradeBarHistory.loc["BTCUSD"].iterrows():
atr.Update(index, tradeBar["close"])
I'm using this setup to determine the renko brick size on init, the ATR indicator needs an IBaseDataBar from what I can tell, is there a good way to make that object fromt the rows of the historical dataframe?
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...
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!