Hi Guys,
So far the help on here has been really useful and I have been able to build a basic algorithm. However, when I backtest and look at the trade log, the trades seem to happen at unexpected times.
Take this backtest. The first buy order triggers at 2018-03-01 14:00:00 (image 1). If I go to Oanda and look at their chart, the requirements for a buy order are not met:
Fast EMA is not above Slow EMA, and RSI is less than 40. Also, the backtest price seems way off the market price.
There is a similar case for closing the trade too. The first trade was closed at 2018-03-05 03:00:00 (image 2).The fast EMA is not less than the slow EMA. Again, the order price seems way off the Oanda chart price.
Can anyone tell me where I am going wrong?
Douglas Stridsberg
Hi,
When you're debugging this, make sure you know what timezone your Oanda charts are displaying the data in, as well as what timezone QuantConnect is displaying trade times in. I would think a difference in timezone explains the behaviour you're seeing.
Charles Bosworth
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!