Small Aircraft
Flight Crew Flight Instructor; Flight Crew Commercial; Flight Crew Instrument; Flight Crew Multiengine
Flight Crew Last 90 Days 100; Flight Crew Total 411; Flight Crew Type 300
Situational Awareness; Communication Breakdown
Conflict NMAC
Flight Crew Took Evasive Action
Aircraft
My student and I were doing takeoffs and landings at FXE. We were on the first quarter of the right downwind. My student and I noticed a plane about 50 feet above us from the right window and we promptly put the nose down. Right before this happened; Tower was trying to figure out if the plane that almost hit us had traffic in sight and both Tower and the traffic seemed very confused. After we avoided the traffic I told Tower that the traffic flew about 50 ft above us. The plane that flew above us explained that they were following the wrong traffic (the traffic that was in front of us). I tried to call Tower to inquire about this event and what we can all do differently to avoid it next time but they did not answer.
Instructor pilot reported an NMAC with another aircraft that was supposed to follow them but was following traffic ahead.