That would store it in the mirc folder or the settings folder. You could use $scriptdir to store it where the script file is...

write $qt($scriptdirtracenicks.txt) $4