Hi,

This is my first algorithm that I tried to code.

I have tried to implement an algorithm to buy SPY Call Option based on RSI. 

I was trying to buy the option when the RSI is below 15. However, only the first trade shows "RSI is less than 15" in the log. When I go through the orders, some orders were made without the RSI below 15, and I could not see where the problem is in the code.

 

Much appreciate if anyone could help me on this. Thank you.