Hi;
Where is OnData() documented? I want to get the specifics on when it is called because all the videos & documentation say it's called when data is updated, which doesn't tell me specifically when it happens.
thanks - dave
QUANTCONNECT COMMUNITY
Hi;
Where is OnData() documented? I want to get the specifics on when it is called because all the videos & documentation say it's called when data is updated, which doesn't tell me specifically when it happens.
thanks - dave
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.
Mak K
Hi David. OnData() is triggered every time when new data comes into your algorithm. Usually that interval is going to be your universe resolution. If you add assets to trade using minute resolution then your OnData() is going to run every 1 minute. Hope that clears it up, if not feel free to ask follow up questions!
David Thielen
Hi Mak;
Is OnData() documented anywhere? Part of this is my specific concern for the case where it tests if requested data is fully loaded yet - what if it is not, I return, and the next call is not for a day. So I want to know what the worst case is for this situation.
But more important, I want to know where this is documented so for additional questions on the API, I can find the info so I don't need to keep asking. Same as for my question on the EMA - I want to know where to find this so I can teach myself and not have to ask for each API.
thanks - dave
Mak K
https://lean-api-docs.netlify.app/index.html
Generally if this is worrying you it would be better to run the OnData() on a smaller resolution and have the symbols you're trading on a different resolution. I haven't run into any such issues yet so far however.
David Thielen
Mak;
Thank you, that API doc is what I was looking for. Unfortunately it doesn't say much about the method so it will require questions like this ongoing. But at least I can look there first, so thank you.
David Thielen
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!