Back

New To quant connect. need help making a test shell to learn the platform.

Hello,

I am new to this platform. If some one could give me a example of a simple algo that scans the markets and goes long any stock that is over the 8 ema and shorts any stock that is under the 8 ema. Then gets out of a position if it hits 2 average true range and stops out if it hits 1 average true range.

Very basic just for learning the platform and quantconnects functionality.

Thanks

Update Backtest







0

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.


Hello,

 

have a look at the github repo, tons of code examples there

 

0

Hi Dylan.

Welcome! I suggest you check out BootCamp and this documentation section on Universes to get started

.I've attached a backtest where I demonstrate how to select a list of high volume stocks using Coarse Universe Selection and determine whether the stock price for each stock in the universe is above the Exponential Moving Average (EMA).

If the stock price is above its EMA, then the algorithm buys the stock and sets Take-Profit and Stop-Loss levels using Average True Range (ATR).

This algorithm can be extended to identify and short stocks that are in a down-trend. Good luck!

1

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.


Thank you so much halldor this is great. And perfect for me to start playing around with.

0

Update Backtest





0

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.


Loading...

This discussion is closed