I would say that this old adage applies here:
"If it were that easy to make money, everybody would already be doing it."
The markets are not as simple as that; they cannot be figured out and gamed by an automated computer program. Your best bet at making money in the stock market is to diversify your investments; don't invest all your money in one stock, because this leaves you vulnerable to inevitable declines in stock price for that particular industry. You have to own a little bit of everything... Small cap, large cap, foreign stocks, precious metals, commodities, utilities, etc. Consider indexing; that is, owning the whole market. Unless you become an expert at picking stocks through years and years of experience, research, and education, you're probably better off with indexing.