Hi,
I am Sourabh Jain. I am interested in the project. I have written several EA using custom indicator on Metatrader. I recently wrote an EA which opens trade at current market price or limit price with fixed TP & SL, if SL is hit it opens contrary position with modified lot size till target profit (USD) is achieved (overall trade count has user defined limit). It is quite close to martingale you need. If you are interested , let me know.
Regards
Sourabh