Hi, Instead of JS you can use Gain Offset correction in the profile. About average maybe state filter will help