Hello,
I am new to Quantconnect and I am trying to learn the software by writing a simple algorithm that buys bitcoin when the price goes above the 21 bar EMA and sells when the price goes below the 21 bar EMA. The algorithm will only do this when the 21 bar EMA is above the 200 bar EMA
In order to debug, I am plotting my data on a custom chart so that I can see what my algorithm is doing.
First, I initialize my EMA indicators and warm them up.
The final step is for the algorithm to plot the data. However, it currently plots the warm up period and not the time period specified by my SetStartDate and SetEndDate.
Please Help!
Pseudo code of what I need to do:
if date ≥ StartDate:
plot(data)
Vladimir
BenLM,
Try this
BenLM
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!