Here's the output from a slightly modified version of Antonio's code for a longer period: The gain is 44% over 59 months if all profits are reinvested, without resorting to short trades. The first trade didn't occur until 16 months after the start. The buy/sells are:
Strategy: Moving Average Crossover filtered with RSI
2009-05-11 buy @ 91.7
2010-06-10 sell @ 107.86
2010-10-13 buy @ 117.66
2011-07-06 sell @ 133.49
2011-12-30 buy @ 126.02
2012-06-21 sell @ 135.64
2012-08-06 buy @ 139.72
(still open)