You, lucky sir, if you are in fact a non-resident alien (in the US less than half of one year), are tax-free for capital gains with a few caveats andand such.
Generally speaking, if you are a long term investor in non-real estate securities and spend no time in the US, your capital gains are not taxable.
If the short term gains appear to be from trading and not investing, they may be taxable.
Dividends are taxed at a merciless 30% with exceptions, unless there's a tax treaty between your home country and the US to say otherwise.
That said, you're still required to pay the capital gains/income taxes on all your income, home and abroad, in your home country.
Any tax experts feel free to edit for accuracy.