MetaTrader 5 Python User Group - the summary - page 15

Vladimir Perervenko
5008
Vladimir Perervenko  
Yazen WAKED:

Hello,


I could not install MetaTrader5 by:

  pip install MetaTrader5


I got the following error:

ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)

ERROR: No matching distribution found for MetaTrader5


Knowing that I am on MAC laptop and I have Python 3.7.6


Thanks in advance to provide me the solution

Only Windows :(

nicholish en
2758
nicholish en  

I just wanted to update this thread with some feature requests...

  • market_book_get - self explanatory 
  • pass the symbol and timeframe as args when evoking a python script by dropping it on a chart. For example, you drop "echo_args.py" on the EURUSD M15 chart and the terminal would evoke the script as:
python echo_args.py EURUSD 15

So that way you can pick up the symbol and timeframe in the sys.argv

if __name__ == '__main__':
    import sys
    if len(sys.argv) >= 2:
        print(f'script dropped on the {sys.argv[1]} chart with timeframe set to {sys.argv[2]}')

  • modify the API to return dict objects by default instead of namedtuples because the namedtuples cannot be pickled and must therefore undergo a computationally expensive conversion to transform data back to native dict in order to use multiprocessing. (https://www.mql5.com/en/forum/306742/page14#comment_15800026)










Mars Yuan
167
Mars Yuan  

Dear Sergey:Why is there no integrated feature of Pyhon_scrite in the current V2361 version? What a great feature this is?

https://www.metatrader5.com/en/releasenotes/terminal/2125

(Pictures published in the 2340 release)

Python scirt for V2340

MetaTrader 5 Build 2340: Managing account settings in the Tester and expanded integration with Python
MetaTrader 5 Build 2340: Managing account settings in the Tester and expanded integration with Python
  • 2020.02.21
  • MetaQuotes Software Corp.
  • www.metatrader5.com
Added new functionality for working with SQLite databases. In the previous platform update, we introduced support for operations with SQLite databases directly from MQL5. The main functions have become available through the MetaEditor user interface: How it works The quick database creation functionality is available from the MQL5 Wizard. You...
Sergey Golubev
Moderator
122449
Sergey Golubev  
Mars Yuan:

Dear Sergey:Why is there no integrated feature of Pyhon_scrite in the current V2361 version? What a great feature this is?

https://www.metatrader5.com/en/releasenotes/terminal/2125

(Pictures published in the 2340 release)


I am not a specialist on Python sorry ... but as I see - the discussion is going on in the other part of the forum,
example - post and next posts after that.

Also - look at examples here https://www.mql5.com/en/docs/integration/python_metatrader5

Georgios Kourogiorgas
2010
Georgios Kourogiorgas  

Can the python integration be used some how to automate testing? For example to test an EA against many currencies, timeframes and settings?

I am currently using the command line start but I was hoping the python integration could do that

nicholish en
2758
nicholish en  
Georgios Kourogiorgas:

Can the python integration be used some how to automate testing? For example to test an EA against many currencies, timeframes and settings?

I am currently using the command line start but I was hoping the python integration could do that

No, but maybe you can take some inspiration from here: https://github.com/samuraitaiga/py-metatrader

samuraitaiga/py-metatrader
samuraitaiga/py-metatrader
  • samuraitaiga
  • github.com
py-metatrader 0.0.1 Released: 30-May-2015 Introduction py-metatrader is a python package that provides interfaces to metatrader4(mt4). metatrader4 is a trading platform that can automate trading(fx, stock, etc...) by your own program(ExpertAdvisor in mt4). you can automate simuration(backtest in mt4), CI EA development , etc... by using this...
Georgios Kourogiorgas
2010
Georgios Kourogiorgas  
nicholi shen:

No, but maybe you can take some inspiration from here: https://github.com/samuraitaiga/py-metatrader

Thanks. So it is a wrapper of the command line... Good work.
Sergey Golubev
Moderator
122449
Sergey Golubev  

The Main Study

----------------

The Article

----------------

Metatrader 5 Help

----------------

The CodeBase

----------------

The Forum

----------------

The Blogs

Something to Read - Python for Finance: Analyze Big Financial Data - the blog post (the book)

----------------

more to follow ..

amirhossein rahbari
10
amirhossein rahbari  

Hello dear friends ,

I am a beginner user in meta trader , I am so interested in using python API for my trading tasks,

but when I was trying to load all the symbols by 

symbols=mt5.symbols_get()

it return None as symbols but when I wrote in other script

rates = mt5.copy_rates_from("غسالم", mt5.TIMEFRAME_D1, utc_from)

it gives corresponding data to غسالم  and works well . 

because I want to trade on all symbols and filter them  it is mandatory to access their list but unfortunately the symbols_get is not working . please help me to find solution 

my broker  : Mofid

and symbols are written in Persian.

amirhossein rahbari
10
amirhossein rahbari  
Yazen WAKED:

Hello,


I could not install MetaTrader5 by:

  pip install MetaTrader5


I got the following error:

ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)

ERROR: No matching distribution found for MetaTrader5


Knowing that I am on MAC laptop and I have Python 3.7.6


Thanks in advance to provide me the solution

I had same problem too . The solution is install  python 3.7.2  and add to path environment then  run the python in cmd or bash to make sure your default version is 3.7.2  then use python3 -m pip install MetaTrader5