Grupo de usuarios de MetaTrader 5 Python - cómo utilizar Python en Metatrader - página 60
Está perdiendo oportunidades comerciales:
- Aplicaciones de trading gratuitas
- 8 000+ señales para copiar
- Noticias económicas para analizar los mercados financieros
Registro
Entrada
Usted acepta la política del sitio web y las condiciones de uso
Si no tiene cuenta de usuario, regístrese
Ya está disponible la versión 5.0.30
Gracias.
Ya está disponible la versión 5.0.31
¿Algún cambio importante?
No, sólo algunos arreglos para https://www.mql5.com/en/forum/306742/page13#comment_15699363
https://pypi.org/project/pymt5adapter/
https://github.com/nicholishen/pymt5adapter
Gracias, este ejemplo que vi, funciona.
Estoy un poco sobre otra cosa.
positions_get - se me devolverá la lista de TradePosition. En principio, se puede echar a los pandas y funcionar bien.
Pero no todo se limita a una pandas, y si necesitas conseguir algo como:
tienes que componer de alguna manera, pandas o para... de alguna manera un montón de movimientos corporales adicionales.
Se ha vuelto mucho más conveniente con _asdict (), si el que escribe no es un prog de MQL5, sino digamos un pythonista ... o un datasynetist, entonces la lista / dict es
Los elementos básicos de python, muchos están construyendo una transferencia de datos en la lista / dict.
Las tuplas se utilizan mucho y muy a menudo, pero sólo si se necesita un control estricto de los tipos de datos que se mueven en ellas.
y también cuelga un manejador de errores, si no se usa o se asigna correctamente. Bueno, en algún lugar ... :) Podría estar equivocado.
Ok estoy completamente de acuerdo con este sentimiento ahora, y también creo que devolver los datos como namedtuples en lugar de diccionarios es demasiado opinable para una API. Recientemente he tenido problemas con este diseño porque es imposible hacer un pickle de namedtuples. Considere el siguiente script de copiado de comercio concurrente. ¿Notaste lo complicado que es convertir todas las namedtuples en diccionarios para poder utilizar el ProcessPoolExectutor?
trade_copier.py
terminal_config.json
Es especialmente difícil cuando hay namedtuples anidados dentro de namedtuple, como es el caso de OrderSendResult.request. Así que hay que crear funciones de conversión únicas para convertirlos de nuevo en tipos de datos seleccionables. Se podría pasar todo por una función recursiva para convertirlo de nuevo en tipos de datos nativos, pero esto es computacionalmente caro.
https://pypi.org/project/pymt5adapter/
https://github.com/nicholishen/pymt5adapter
Fallo en la instalación
Win10, Py3.6.10 y WinPy3.7.7.