Mainly there are three things I'm interested in: Let's say we are allowing a maximum of 2 trades at a point in time. 

• If the 2nd trade has a different size, how would you recommend we account for that? Eg. I am risking 2% per trade. Trade 1 fired 100 shares of Roku. Trade 2 fired 102 shares of Roku. 

• If we store this info in memory and the script crashes. How do we get this info back on the reboot? 

• Is there a way for the script to auto-reboot after a crash or must we manually do it?

On a side note: If I use the "if self.Portfolio["ROKU"].Quantity == 0" for tracking orders, does the script interfere with another script that is trading the same currency?

I'm new to QT and I'm not sure about all the workings so I appreciate any help.