This thread can be useful to begin with:

https://fxdreema.com/forum/topic/6624/problem-in-martingale