MT4 generates signals for entry and exit in the selected stock or commodity. Second required thing is the robot bridge which gets signals from MT4 and makes algo trading possible to your trading account. Third is your strategy, it is also very important because it only decides the profitability of your trades.