There are a lot of grid-building scripts floating around on a lot of forums. You just need to do a little searching.
The biggest drawback of grids is that you have to be willing to live through the unrealized drawdowns. On your 50k account, are you willing to see an unrealized drawdown of 20, 30, even 40K when your grid is "fanning out", and still hold your position, "knowing" that the grid is going to close eventually?
The grid systems that I've seen rely on you being hedged until the market trends enough for you to close the whole grid for a profit. The problem with using a TP in this is that once you take profit, the hedge is gone. Now you've exposed yourself to unlimited risk.
I'm not saying grids don't work. I'm testing a couple right now and I see a lot of potential to have a really solid trading system. (I know I "preach" a lot about learning to Trade, not Follow. This is my one venture into purely mechanical Following.) All I'm saying is that you need to be very conservative with your margin. The grids I'm testing now, I make sure I have between $750 - $1,000 capital / pair, trading at $0.01/pip. (yes, that's really 1 cent/pip) With 50K, I'd be trading 4 pairs at $0.12 - 0.15/pip.
I'm not sure I really have a point in all of this. I guess I'm just rambling.

Oh, I know... Whoever tries to use grids, just make sure that you trade very, very conservatively with regards to your margin. Break that rule at your own peril. There's nothing worse than being in the middle of a large grid and you run out of margin. Everything goes to hell as your account blows up.
Keris