Cessna 425/441 Conquest I/Conquest II
Flight Crew Commercial; Flight Crew Instrument; Flight Crew Multiengine
Flight Crew Last 90 Days 27; Flight Crew Total 1125; Flight Crew Type 122
Communication Breakdown
ATC Issue All Types; Conflict NMAC; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance
Flight Crew Took Evasive Action
Human Factors
My routing was to the west taking off Runway XX. I typically set my heading bug prior to getting a takeoff clearance guessing what I will get given the situation as part of my initial avionics settings. I set it to 340. Upon getting cleared for takeoff I was given a turn to 340 as I expected. Climbing through 1500 on a 340 heading I was asked by Tower if I was on a 040 heading. Tower said turn 040 and traffic 12 o'clock; 1600; 1 mile and that he needed an immediate response of in sight. I looked at traffic on my avionics which indicated 100 below; and I then immediately got them visually and gave a quick in sight. I think this stepped on Tower calling traffic to Aircraft Y. They called in sight and descended and turned left and I kept climbing and turned right. I don't think Tower ever heard my in sight call.Thinking back; I likely suffered confirmation bias on the initial heading. Having set 340 I heard 340 instead of 040.
C441 pilot reported an NMAC during initial climb from APF airport due to communication expectation bias.