Hi everyone,
like my last community posts I have big problems with converting a daily strategy to a 4hour strategy.
So I have 2 questions and I hope you can help me:
- Can someone please help me to convert this daily strategy to a 4h strategy. I know I have to do this with data consolidation and I am able to do this when I only have one indicator, but I don't know how to do it with a more complex algorithm and more indicators.
- Do you have some general hints what I can make better regarding the syntax for this algorithm.
Thank you!
Best regards
Marcel
Vladimir
Marcel Friz,
To fulfill your request we completely rebuild your code, made it long only, removed unnecessary.
If you are satisfied with my answer, please accept it.
Enjoy
Vladimir
Here are some indicators
.ekz.
Well done Vladimir, and: interesting strategy Marcel Friz
.ekz.
Vladimir Nice indicator plots!
Could you please share the code?
Vladimir
.ekz.
Here it is
But we need to run each set of indicators separately due to the limitations of the charting capabilities.
Vladimir
QC,
For some reason, the Expose plot shows the wrong portfolio exposer, not the same as we calculated it on OnEndOfDay ().
.ekz.
Thanks Vladimir!
Marcel Friz
Hi Vladimir
Thanks for your time and your effort.
That's exactly what I was looking for!
Best regards
Marcel
Alexandre Catarino
Hello!
Vladimir has contacted support@quantconnect.com to get some clarification on the difference he found on the Expose calculated by QuantConnect/Lean and the values that he has found manually.
Fortunately, the answer is simple: different sampling times. OnEndOfDay is called 10 minutes after the market is closed and our samplings are done at Midnight. Instead of using OnEndOfDay, we should use a Scheduled event:
with
Let me note that crypto-currencies markets don't close, so Lean considers that it closes and reopens immediately at midnight.
Marcel Friz
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!