1. Yesterday, I had a huge headache trying to figure out where an exception throwing bug happened, since line numbers aren't shown on callstack in Mono, and (this appears like a bug on LeanEngine's side) Log/Debug output in the event handling method prior to the exception did not appear. I.e. Log("this"); would simply not print anything, if there was an exception happening after it. In this case, exception was thrown inside a constructor (higher up on the call stack). I speculate that the log streams get killed by the exception propagating out of my event handler and do not flush, but I haven't read LE's code yet.
2. Currently having a scheduled event being triggered multiple times (about once per minute), after being scheduled with the following:
Schedule.On(DateRules.EveryDay("SPY"), TimeRules.AfterMarketOpen("SPY", 5), UpdatePortfolio);
Maybe this means "trigger every minute, starting 5 minutes after market open"? Either that, or the particular fact the called method throws an exception in live mode (due to another bug) makes the system retry the event call. Of course this is a less significant error that I can fix on my own, but I figured I might as well ask since I'm posting the above issue anyway.
Petter Hansson
Forgot to state so; I'm desiring the scheduled event to only trigger once per day if it wasn't clear from context.
Jared Broad
Schedule.On(DateRules.EveryDay("SPY"), TimeRules.AfterMarketOpen("SPY", 5), UpdatePortfolio);
Will trigger once per market trading day for SPY 5 minutes after open - if its not doing that please share the algorithm and we can assist further.
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.
Petter Hansson
Alright, I'll be attempting to repro both issues in isolated test algos tomorrow.
While at it, thank you for being so quick in answering my questions. :) It makes QC look good!
Petter Hansson
I shared Exception Test with you, let me know if you can't find it.
Petter Hansson
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!