I'm a software Operations guy, not a quant, so when I sat down to write my first algo, I was mostly ignorant about commonly used strategies. What I came up with was a simple local minimum / maximum strategy.
The idea is simple... Keep track of the 7-day moving average for the past five days, buy if we've just passed a local minimum, and sell if we've just passed a local maximum.
I define local maximum as the price on day 3 being higher than both day 1 and day 5, and local maximum as the price on day 3 being lower than both day 1 and day 5.
To limit potential damage from a single transaction, I buy or sell only 10% of the current value of my portfolio in each transaction.
This code also shows a simple technique for driving my algorithm on a daily rather than minute-by-minute basis. Each time through the handle_data function, I check if the day has changed, and if so, run my calculations and then stash the current day so I won't run them again until tomorrow.
I'd love to hear people's thoughts.