A group number is set to the trade, then read from the trade, which means no resetting should affect this, even if the trade is swapped the new trade should have the same group. A group number is the bot's magic number + the group number
@James-d AFAIK, you cannot do that unless the broker allows you to do it. There will always be a maximum leverage offered and there will be no way to use a higher one.