Hi,

I'm new on creating algos here on Quantconnect. Tried searching for the answer but got even more confused than before. If this has been answered already please do send me to that thread.

I got 2 questions:

1. I want to compare the current daily close price for a stock to sma200. If it's above I want to buy and if it's below I want to sell. But can't get the backtest to working. I think it has to do with my price formatting?

2. How do I compare today's close price with yesterdays and the day before?

Thanks in advance!