automated trading

Has anyone here written a computer program to do algorithmic trading?
If so, what brokerages allow this?