Praise be to Allaah.
There is nothing wrong with that, because it is a small movement and is nothing big. There is nothing wrong with clenching one or two fingers so as not to forget, and this is not moving too much. Rather it is something small that is in the interests of the prayer, so it is excused. End quote.
Shaykh Abd al-Azeez ibn Baaz (may Allah have mercy on him).