There is absolutely no way to tell how long you should hold a stock when you buy it.

My Sell-to-Buy system might be relevant to this thread, as it deals with the selling dilemma:

It works well for long-term investment (validated by backtesting 5 year time periods over a 10 year daily dataset on the UK FTSE 100 constituent companies) when buys are made at an average of about one every two weeks. So in the short term early results may lose out - but the system appears to work in the long term long term probably due to the cyclical nature of stock prices. All profits and dividends should be accumulated and no withdrawals being made so that additional stocks may be acquired. I have tested it with 3, 5 and 10 starting holdings and although it might intuitively seem higher risk, the best result is with just 3 initial holdings. It could be useful for investment clubs interested in long term growth.

1. Divide an initial investment sum by 3 to give a lot size for all subsequent purchases.2. Buy your first three holdings.3. To buy your 4th holding, only do so if you best holding is showing at least 5% profit.4. Bank the profit and continue to accumulate profits each time you sell.5. Buy next holding from banked profits when possible6. If bank is insufficient and no holding is in profit when you want to buy, do nothing.7. Apply a 40% stoploss to each holding.8. Sell all on market crash (10/10/2008 and 3/3/2009).9. Track your stoploss companies (including those you did not buy) and rebuy if they fall below 50% of original price.

It works for me and if you have a record of your transactions over the last 5 years you might like to try the scheme to see how it could have performed for you.