I am incredibly new to this platform. I have only tried to do some of the courses and have not tried to recreate my own bot.
I am trying to use the 30 and 10 EMA to filter for stocks to trade. After which the bot would follow the Bollinger band. Whenever the price crosses the middle Bollinger Band but does not go through the lower band, it would buy. And when the price crosses the upper band, it would sell the shares.
Could you please help me
Papa Bear
Hey Zheng,
I'd recommend checking out the 200-50 EMA Momentum Universe Tutorial in Bootcamp.
That should get you started in the right direction 😊
Â
Nico Xenox
Hey Financial Freedom with Zheng Tian,
you can also look at different algos provided by QC on github:
LIST
EmaCrossUniverseSelectionAlgorithm
EmaCrossUniverseSelectionFrameworkAlgorithm
MovingAverageCrossAlgorithm
SmaCrossUniverseSelectionAlgorithm
Â
Hope it helps 😊
Financial Freedom with Zheng Tian
Good day
I was able to use the above algo to create this project. However, when I backtest the algo, it shows errors. May I know what are the issues with the codes? Please explain to me the reason in simple English as I am extremely new to this platform. thank you
Nico Xenox
Hey Financial Freedom with Zheng Tian,
The problem is that you might try to get information from a symbol that does not have data yet. For this you can add this line:
The other error is insufficient buying power. This has to do with the way you set up your strategy. Either lower the percentage in the holdings or change the number of symbols that you buy.
I attached your code with the added line and another version which takes the history request into the class and sorts/selects symbols from the values of the selection data. I also adjusted a few other things so it will give another result(only for testing purposes.
Please accept this answer if you're satisfied with my answer, hope it helps 😊
Â
Financial Freedom with Zheng Tian
Good day ever since the recent update, my bot suddenly does not work. May I know which code I need to change so that it would work again? thank you
Louis Szeto
Hi Zheng
Can you provide the error message and related code snippets for further assistance? Thank you
Best
Louis
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.
Financial Freedom with Zheng Tian
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!