Hi,
May I know how special is your martingale?
I have a library of trade management functions I've written over the years, and I'm sure I can find one that can be best suited to your needs and modifying it. This is probably the fastest approach to the problem at hand.
I have over a decade of experience coding trading systems, with the past 7 focused mainly on mql4 for the mt4 platform. Althought new to the site, I am definitely qualified to do this job for you.
Thanks for considering me.
Cheers,
Shi Jun