Here's a book that does a lot of backtesting. Apparently he supplies pseudo-codes that you can probably easily translate to c/c++. I don't think there are too many generic backtests outside of proprietary scripts. I have one for a spreadsheet if interested. Good luck with your search. http://www.amazon.com/exec/obidos/tg/detail/-/0071412395?v=glance