Hi All,

I am sure it will be immediately clear from looking at my code that I am new to Python. I love all the resources QuantConnect provides, however I am trying to learn by writing my own basic models and while I can do that when only one stock is involved, I have since tried to build a program that uses a long/short strategy, if one stock's RSI is above 70 and the other is below 30, it will go long on the one under 30 and short on the one over 70. However, whenever I try and do this with this code I've written it gives me the error: “Runtime Error: TypeError : 'Pair' object does not support indexing” I know there are examples of pairs trading and I have tried to follow them, but they all seem to simply trade one stock at a time, I would like to filter for the situation where one stock is above 70 and the other is below 30. I am sure I am missing a few important things, so if someone could point me in the right direction that would be great, as I am hoping to build out this strategy to work with more stocks in the future.

Thank you 

Author