Need an Algo written $50 USD

 
I need an algorithm written for me to buy when price crosses over sma - 200. And sell when certain prices hit. And on the other side when the price crosses under sma-200 sell, and then buy when certain price hits. 
 
Post your requirements as a job in the Freelance section please.