MetaTrader 5 Python用户组 - 如何在Metatrader中使用Python - 页 59

 
Дмитрий Прокопьев:

你为什么需要VS?Python不需要VS。

在谷歌上搜索类似window python的东西,你就可以了。

Python确实要求你的计算机上有一些VS库。

 
WindowsCompilers - Python Wiki
  • wiki.python.org
Even though Python is an interpreted language, you may need to install Windows C++ compilers in some cases. Unlike Linux, compilers for Windows are not included by default in the OS. For example, you will need to use them if you wish to: Microsoft provides official C++ compilers called Visual C++, you can find them bundled with Visual Studio...
 

我试着使用新更新中定义的新的symbols_get()&symbols_total() 方法,但我无法让它对我起作用。

我多次尝试在symbols_get() 方法中使用不同的'group' 参数,但它总是返回None,我 还尝试在终端的市场观察中添加所有符号;但没有成功。

错误快照

下面是代码的截图,如果我做错了,请告诉我。

 
Kiran Sawant:

我试着使用新更新中定义的新的symbols_get()&symbols_total() 方法,但我无法让它对我起作用。

我多次尝试在symbols_get() 方法中使用不同的'group' 参数,但它总是返回 None,我 还尝试在终端的市场观察中添加所有符号;但没有成功。

下面是代码的截图,如果我做错了,请告诉我。

请经常添加此类信息

#  display data on the MetaTrader 5 package
print("MetaTrader5 package author: ",mt5.__author__)
print("MetaTrader5 package version: ",mt5.__version__)
 
#  establish connection to the MetaTrader 5 terminal
if not mt5.initialize():
    print("initialize() failed, error code =",mt5.last_error())
    quit()
 
#  display data on MetaTrader 5 version
print(mt5.version())

如果你得到的是None,还要检查last_error()。

 
Rashid Umarov:

此外,许多功能的描述也随着它们的完善而被改变。几乎所有的例子都被重写以反映新的功能。但是,以下功能的例子还没有在网站上更新,稍后会有。

该网站已被更新

 
Rashid Umarov:

请经常添加此类信息

如果你得到的是None,还要检查last_error()。

终端版本:[500, 2361, '08 Mar 2020']

作者:MetaQuotes软件公司。

MT5 Python模块版本:5.0.29

last_error:[-5, 'Terminal: Incompatible versions, please install latest version of Terminal and Python module']


我想我需要等待新的MetaTrader5更新。

 
Kiran Sawant:

终端版本:[500, 2361, '08 Mar 2020']

作者:MetaQuotes软件公司。

MT5 Python模块版本:5.0.29

last_error: [-5, 'Terminal: Incompatible versions, please install latest version of Terminal and Python module']


我想我需要等待新的MetaTrader5更新。

import MetaTrader5 as mt5


def main():
    package_version = tuple(map(int, mt5.__version__.split('.')))
    terminal_build = mt5.version()[1]
    assert package_version >= (5, 0, 29)
    assert terminal_build >= 2372


if __name__ == "__main__":
    try:
        if mt5.initialize():
            main()
    finally:
        mt5.shutdown()
 
Kiran Sawant:

终端版本:[500, 2361, '08 Mar 2020']

作者:MetaQuotes软件公司。

MT5 Python模块版本:5.0.29

last_error: [-5, 'Terminal: Incompatible versions, please install latest version of Terminal and Python module']


我想我需要等待新的MetaTrader5更新。

请通过帮助->检查桌面更新,升级到最新的测试版2374。
 
MetaQuotes:
请通过帮助->检查桌面更新,升级到最新的测试版2374。
MetaTrader5收到了最新的更新,新功能 现在运行良好,非常感谢。