I'm not sure but if the system in Stock Market is dealing with cheating and riba (interest), for sure it is haram, maybe someone here in TTI knows about it.
Investing in share is permitted. You are investing in a company which gives you divident as a share of profit, however make sure to know about the company and its business before you invest.