My first go at this (too much fun!). Basically cloned Dan Dunn's "200,000% Return" algo plus some from Jonathan Kaman's "Simple Local Min/Max". Changed a great deal of both, though.
The algorithm attempts to implement a model of a very simple electrical circuit function called a 'peak detector', just to see what would happen. Basically just trying to sell quickly when the price starts falling (to hold on to the cash), and to buy just as quickly when the price goes up (to catch the peaks). Also wanted it to only buy or sell when the volume for this stock (Apple) was greater than the previous increment, to roughly gauge demand. My intention was that it would either buy OR sell each time through, but it seems to do both each time. I know that's a bug in my code, but the results seemed worth sharing, if only to find out what I could be doing wrong that could make things looks so right! I doubt that buying and selling so frequently is really a viable strategy, unless you want to make your broker rich on commissions.
Looking forward to the comments (Guffaws welcome, too).