This is my very first algo, I don't know what I don't know and I don't know why all my Market orders are being placed / executed at midnight exactly… at time 00: 00 : 00 …
The algo uses Super Trend and I intend for it to buy on Bullish signal and liquidate when trend reverses, then place a Sell market order straight away. So obviously, orders must be executing at all different times..
Please help if you can….
Adam W
This is because the data resolution is set to Daily. I would suggest increasing this to Minute or at least Hourly if you want to model intra-day price movements.
Vladimir
Zimman
There are some inconsistencies in the code you published.
The code trying to resample daily data
res = Resolution.Daily
into 50 Hours bar data
consolidator = TradeBarConsolidator(timedelta(hours = BAR))
If you change to
res = Resolution.Minute
The execution will be
If you are satisfied with my answer, please accept it and don't forget to like it.
Zimman
Thank you very much Vladimir and Adam. Your dedication to help others is very much appreciated. 😊❤️
Zimman
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!