MetaTrader 5 Python User Group - how to use Python in Metatrader - page 47

 
Vladimir Perervenko:

If we now try to reconnect

All in all, it's very crude so far...

You have been given the correct call option above. You cannot write login=NNNNN.

 

The symbols_total and symbol_name functions are missing
To get a list of symbols like this:

string name = "";
int total = SymbolsTotal(true);
   
for(int i = 0; i < total; i++)
{
   name = SymbolName(i, true);
      
   ...
}
 
Rashid Umarov:

You have been given the correct version of the call above. You cannot write login=NNNNN.

I didn't see this message when I wrote it.

A few questions:

1. What is the difference between mt5.initialize() and mt5. login()?

2. the terminal is explicitly defined by three parameters (path, server(broker), login(Acc)). Having initialized the terminal with these three specific parameters, we don't need to login to it. Or do we need to?

3. In this case, may a terminal with specific (path, server(broker), login(Acc)) log in to a few scripts, which also have three parameters (symbbol, TF, TC)? Or for each such script must be started a separate terminal?

4. the terminal cannot work with more than one broker at the same time but with more than one account?
 
Vladimir Perervenko:

I didn't see this post when I wrote it.

A few questions:

1. What is the difference between mt5.initialize() and mt5. login()?

2. the terminal is explicitly defined by three parameters (path, server(broker), login(Acc)). Having initialized the terminal with these three specific parameters, we don't need to login to it. Or do we need to?

3. In this case, may a terminal with specific (path, server(broker), login(Acc)) log in to a few scripts, which also have three parameters (symbbol, TF, TC)? Or may I ask, which of them needs to start a separate terminal?

4. the terminal cannot work with more than one broker at the same time but with more than one account?

1. initialize - start terminal, connect to it and login, login - only login, works only with initialized connection.

2. No need, all parameters can be set in initialize, without parameters, it will connect to default account.

3. Multiple Python modules can login to one terminal, BUT the terminal only works with 1 current account, if you re-login to one script, you will re-login to others.

4. it cannot work simultaneously, if it is necessary to run the terminals from different folders, specify the paths to these folders in the initialize scripts.

 
Almaz:

1. initialize - starts the terminal, establishes a connection and logs in, login - only logs in, only works with an initialised connection.

2. No need, all parameters can be set in initialize, without parameters it will connect to default account.

3. Multiple Python modules can login to one terminal, BUT terminal only works with 1 current account, if you re-login to one script, you will re-login to others.

4. it can't run at the same time, if you need to, you need to run Terminals from different folders, in the initialize scripts specify the paths to those folders.

Got it. Thank you.

Point 3 was important.

 
Where can I download the full source code of the project? I want to run it through Python 3.5.
 
jaffer wilson:
Where can I download the full source code of the project? I want to run it through Python 3.5.

Forum on trading, automated trading systems and trading strategy testing

MetaTrader 5 Python User Group - How to use Python in Metatrader

Rashid Umarov, 2020.02.25 14:33

MetaTrader 5 Python online documentation is already available on the website for some of the updated features. For each one examples are shown


Question:

Forum on trading, automated trading systems and testing trading strategies

MetaTrader 5 Python User Group - how to use Python in MetaTrader

wildzes, 2020.02.20 17:52

Afternoon.

Looking for source code of MetaTrader5 package for Python. Came across this section:https://www.mql5.com/en/code/mt5/libraries
But there are millions of links. Chances to find required source code by human search are close to zero.

Please tell me if this library https://pypi.org/project/MetaTrader5/
is it possible to find source code (if yes, I won't mind to get link to it)?

And the answer:

 
Vladimir Karputov :

Question:

and the answer:


Then how can I use it in Python 3.5? Because I can't install it. Can you share the distribution for Python 3.5.0?

 
jaffer wilson:

Then how can I use it in Python 3.5? Because I can't install it. Can you share the distribution for Python 3.5.0?

The link is available from MetaEditor:

And it seems like 3.5 is no longer supported.

 
Vladimir Karputov :

The link is available from the MetaEditor:

And it seems that 3.5 is no longer supported.

That's why I want to know. There is always a solution to problems. I think to solve them in our forum. Please can any developer help me with this?

I have a completed project in Python 3.5.0.

I can't switch to any other version as it had dependencies.

If you can't give a solution, can anyone convert my project to Python 3.7 for free? I don't think anyone can. So instead of bothering me, please share the code or at least release code that works on Python 3.5.0.

Reason: