Black smoke comming from tail pipe on 2004 ford f250 on 2004 Ford F-250 Super Duty

Loss power would not move go dead in drive put in neutral idle fine step on gas pedal black smoke started comming from tail pipe killed truck crank back up and has been running ever since but still is blowing black smoke out of tail pipe when idle and when u press gas more smoke pours out of pipe what could this be put a can of sea foam in tank after this started thinking bad fuel maybe

2 answers 4 comments
scan test for codes
No codes showing up somebody told me egr valve and everything I've read bout it seems similar except this is black smoke not white
No codes showing up somebody told me egr valve and everything I've read bout it seems similar except this is black smoke not white
Which engine? Six options!
6.0 diesel turbo powerstroke
black smoke is usually egr valve stuck open. if it has a miss, could be an injector hung open. that is usually grey smoke and has strong diesel smell.