Python IDLE doesn't recognise an import instruction

 

Hi Guys,

I'm new to coding, but find it quite fun. I'm getting familiar with python as a language to communicate to the computer and building trading algorithms, and am willing to put all the time and effort to start here and build my way up.


however, I do need some help. So, MT5 has the Python Integration doument which details all the different commands and their implications (https://www.mql5.com/en/docs/integration/python_metatrader5), which I'm walking through slowly but surely. 

When accessing Python through cmd, I can import mt5 with no problam. 

but in a Python *document*, when trying to run the program, it gets stuck at the first instruction (import MetaTrader5 as mt5) and doesnt continue to execute any of the following commands.


Any ideas why that happens?


Thanks in advance guys.

Documentation on MQL5: Integration / MetaTrader for Python
Documentation on MQL5: Integration / MetaTrader for Python
  • www.mql5.com
Python is a modern high-level programming language for developing scripts and applications. It contains multiple libraries for machine learning, process automation, as well as data analysis and visualization. MetaTrader package for Python is designed...
Reason: