Can I perform an operation in the EA triggered by the change of external inputs by the user

 
Basically I would like to reinitialize one variable if the user changes the inputs values.

I think that if the user changes the input, the EA is not reloaded but just the inputs are reloaded.
Are also the EA's globlal variables reinitialised or is there anything that is run when the inputs are updated by the user such as init() ?

Thanks
 

Use UninitializeReason function and analyze returned code.

You can call this function in the init. Code 5 means parameters were changed just now.

 
stringo:

Use UninitializeReason function and analyze returned code.

You can call this function in the init. Code 5 means parameters were changed just now.

Thanks for the quick answer.
But just to be sure: will the init be called every time the parameters are changed or is it called only when you start the EA?
 
Every time after parameters were changed and pressed OK button. First deinit with old parameters then init with new parameters. See https://docs.mql4.com/runtime/start
Reason: