It should be possible. In any case, if something doesn't happen as expected, look at the logs for errors. Also note that the block will take the input value and turn it into the nearest possible value, because you can't open any lot size, there is minimum, maximum and lot step.
The type of the variable should be "double".
But I see your projects and I can see that now you are setting this value in the Init section... I don't think it can be very dynamic that way.
Are you woman?