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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
MetaTrader 5 for Python 5.0.33 released:
copy_rates_from does not provide enough data on the M1 timeframe.
Is this the right course of action?
You have a limit on the number of bars in charts, you need to remove this limit in the Terminal (Tools->Options->Max bars in chart).
In future builds of Terminal we will return error (None) when trying such request.
MetaTrader 5 for Python 5.0.33 released:
Awesome! All unit tests passed. pymt5adapter has been upgraded to use MetaTrader 5.0.33.
Both packages can be upgraded with the following command.
https://pypi.org/project/pymt5adapter/
Note: The calendar module has been permanently removed from pymt5adapter
Python 5.0.33
@Almaz
Does not output matplotlib package figure.
From console or python IDE, the figure runs.
Python 5.0.33.
Does not display the matplotlib package figure.
From the console or python IDE, the figure starts.
Try this
code
Try this
code
Thank you. mplfinance interesting library.
But I need a subplot.
Can this library display such a figure?
Python 5.0.33
@Almaz
Does not output the matplotlib package figure.
From console or python IDE, the figure runs.
I assume this is running the script from under the Terminal? Checked, it works.
1. See what errors are written in the Experts tab (at the bottom of the Toolbox)
2. Check in MetaEditor settings that the correct path to the correct Python with matplotlib is in the settings, after changing the settings in MetaEditor you must restart the terminal, because terminal picks up these settings only at startup.
3. it is better not to specify exact path to terminal in mt5.initialize() if you run python scripts from Terminal itself, they will find correct one by themselves, i.e. the one that started them.
I take it it's running the script from the Terminal? Tested it, it works.
1. See what errors are written in the Experts tab (at the bottom of the Toolbox)
2. Check in MetaEditor settings that the correct path to the correct Python with matplotlib is in the settings, after changing the settings in MetaEditor you must restart the terminal, because terminal picks up these settings only at startup.
3. it is better not to specify exact path to terminal in mt5.initialize() if you run python scripts from terminal itself, they will find correct one by themselves, i.e. start it.
Thanks Diamond.
There are no errors. In the Experts tab it was outputted:
The paths are correct.
Removed the exact path in mt5.initialize(), restarted the terminal and the figure started to be output.