The codebase in mql4 is down, but when it's back up look at
http://codebase.mql4.com/2346
Also, consider modifying your ea so it links to mysql once and stores the resulting deal in a Worldwide. Try batching your insert statements into a big one, maybe every five minutes or so.
Also check this thread http://www.forex-tsd.com/metatrader-...ck-writer.html
And look for TickSave.mq4 here: http://www.forexmt4.com/mt_yahoo/?C=N;O=D