Thanks a lot Adolfo! Much appreciated to share this code snippet with the community. It makes me think that we could create some kind of “perfect” codes examples for usual needs like money management, grid orders, stop trailing, etc.. What do you think?