Hello tanaka.. not much to say.. I prepared you a picture.. so it is easier for you to understand 
please implement too this function too:
- if a open and close cycle .. closed in lost.. a recovery will be startet .. like double lotsize or with an own multiplicator
if you will implement marntingale too.. that could be switched on and off.. will be cool too
test it with GU m15..

please implement too this function too:
- if a open and close cycle .. closed in lost.. a recovery will be startet .. like double lotsize or with an own multiplicator
if you will implement marntingale too.. that could be switched on and off.. will be cool too
test it with GU m15..
