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).73723_1553867383.jpgThe 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?