    
    
    
    local CountSelTrack = reaper.CountSelectedTracks(0);
    if CountSelTrack == 0 then  return end;
    
    

    

	   local SelTrack = reaper.GetSelectedTrack(0, 0);
	   local vol = 20 * math.log(reaper.GetMediaTrackInfo_Value(SelTrack,"D_VOL"),10);
retval, preset = reaper.GetUserInputs("ChangeTrackVolume", 1, "", vol)
if retval == true then 
	   reaper.SetMediaTrackInfo_Value(SelTrack,"D_VOL",(10^((preset )/20)));
  reaper.Undo_OnStateChangeEx("Set volume for selected track(s)", -1, -1)
    end;

