Is ordinary income from the sale of stock from an ESPP account considered earned income eligible for the EIC?

The IRS resource guide states that one of the qualifiers for the EIC is "This credit is called the “earned income” credit because, to qualify, you must work and have earned
income.".  Since I have not worked since 2017 the statement above appears to disqualify me for the EIC but TT always puts the ordinary income portion of the ESPP sale on line 1 of 1040 and adds the EIC to my taxes.