Back

Way less trades than expected.

Hello everyone. I'm very new and trying to write a simple channel breakout algo where I go long when price is higher than the highest high of the previous 5 bars and short when price goes lower than the lowest low of the previous 5 bars. My desired timeframe is the 1 minute chart. 

I've gotten my code to work without errors now but when I backtest over a week there are many less trades than I would expect. I'm trying to duplicate the pinescript shown (except with length of 5) which over 2 weeks shows over 1000 trades. 

What am I doing wrong? Thanks!

82991_1565392282.jpg

 

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.


Hi,

If my interpretation of your pinescript is correct, it's entering into two positions on every new close with stops at hh and ll, hence why you're seeing thousands of trades. That's neither what you described in your post nor what you've tried to code up - nor does it fundamentally/economically make any sense.

I suggest you go back and redefine what you're looking to do and then try to implement it in QuantConnect. What you've currently got is probably quite close to what you want.

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