Say you have an algo trading live and it is holding active positions that have not yet met the criteria to sell.  Something happens and the algo crashes.  You redeploy it to get it started back on track and it goes through it's initialization process.  Does it see the positions existing in the account and sell them when the criteria are met?  I think I read somewhere that algos will only close positions that they opened to avoid selling off manual trades that were made in the same account directly through the broker.  While the algo did indeed open the position, it was during the previous deployment.  Does it recognize that and sell the stock, or do you have to liquidate the position manually?

Also, if the algo is written to not buy a symbol if there is an existing position, will it see the open position and not rebuy it again until it is liquidated?

Thanks for the help.