Coder Social home page Coder Social logo

otmql4py's People

Contributors

opentrading avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

otmql4py's Issues

OTMql4PyTest script crashes MT4

Essential information for reporting Issues:

  • What version of Windows, and 32/64 bit:
  • What Build number of Metatrader:
  • Where was the Metatrader installed from:
  • What version of Python:
  • Where was the Python installed from:
  • OTMql4Py from git, or what version of the OTMql4Py installer:

Python Anaconda

I have python27 which is installed by Anaconda. Is there anyways that we can connect this API to Anaconda Python?
I added my Anaconda folder to my environment variable, but it didn't help (python27.dll is in the main folder of Anaconda. However, the other dlls are in different folders)
There are many libraries and packages already installed in Anaconda and would be great if we can access to them.

iPyEvalInt("os.getpid()") cause MT4 hang

In OTPyTestNullEA.mq4

int OnInit(){
    ...
    ...
    iRetval = iPyEvalInt("os.getpid()"); //cause mt4 hang
}

Log file:
2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]
vPyInit - Opened d:\MT4\MQL4\Python\OTMql427../../Logs/_test_PyTestNullEA.txt d:\MT4\MQL4\Python\OTMql427../../Logs/_test_PyTestNullEA.txt
vPyInit - Thread MainThread number 1556
Exception KeyError: KeyError(3528,) in <module 'threading' from 'C:\Python27\Lib\threading.pyc'> ignored

Work around by not a good solution:

//iRetval = iPyEvalInt("os.getpid()");   
//replace as
iRetval = uPySafeEval("os.getpid()");

Essential information for reporting Issues:

  • Windows Server 2012R2, 64 bit:
  • Metatrader Build: 101
  • Metatrader installed from: d:\mt4 (run as portable mode)
  • Version of Python: 2.7.12
  • Python installed from: c:\python27
  • OTMql4Py from git, or what version of the OTMql4Py installer: (latest)

vLogInit() function not defined

Downloaded the Zip from master and copied folder MQL4 following instalation instrutions, tried to execute the test script MQL4/Scripts/OTMql4/OTMql4PyTest.mq4 with error: Cannot call 'OTMql4/OTLibPy27.ex4::iPyInit', 'OTMql4/OTLibPy27.ex4' is not loaded. Trying to compile OTLibPy27.mq4 raises the vLogInit() not defined

when will python 3.x be supported?

Essential information for reporting Issues:

  • What version of Windows, and 32/64 bit: 2008 R2 64bit / 8.1 64 bit
  • What Build number of Metatrader: mt4 b1090
  • Where was the Metatrader installed from: MetaQuotes / Global Prime Au / IC Markets Au
  • What version of Python: 3.6.4
  • Where was the Python installed from: https://www.python.org/downloads/
  • OTMql4Py from git, or what version of the OTMql4Py installer: n/a

Any plans to support python 3.x? was wondering if there was any reason to only support the older version of python. Can you have more than 1 version of python installed? If so, how can I best do this to avoid conflicts?

Usage of this bridge

Essential information for reporting Issues:

  • What version of Windows, and 32/64 bit:32
  • What Build number of Metatrader:4.0 Build 1010 (18 Aug 2016)
  • Where was the Metatrader installed from:
  • What version of Python: 2.7
  • Where was the Python installed from:
  • OTMql4Py from git, or what version of the OTMql4Py installer:current

I was looking to call Python from MT4, MT4 will pass a few arrays of doubles to Python which will use the arrays to calculate and return a double back to MT4. MT4 will then draw an indicator using the return value.
Can this be done? Is there an example to start with? I installed and tried with a simple script in MT4, it hanged MT4 with access violation:

#include <OTMql4/OTPy27.mqh>

int OnStart(){
uchar expr[];
StringToCharArray("a=""a string""",expr);
PyInitialize();
int s=PyEvaluate(expr);
StringToCharArray("a",expr);
s=PyEvaluate(expr);
s=PyGetString(s);
printf("%s",s);

return(0);

}

python27.dll could not be loaded

Hello,

I tried using this library. But when I try executing the script OTMql4PyTest.mq4 or running the EA OTPyTestNullEA.mq4, I get the error: python27.dll could not be loaded.

It's coming from the py27.dll but I can pinpoint further what's causing it. I can make sure that I have the python27.dll on my system32 folder but seems I cannot find these dlls pythoncom27.dll, pythoncomloader27.dll, pywintypes.dll.

Thanks!

cannot load python27.dll

My testing system is summarized as below

  • Windows 8, 64 bit
  • MT4, version 4.00 and build 1012
  • Python installed python 2.7 32 bit (considering 64 bit python can cause problem.) from official python release 2.7.11
  • OTMql4Py from git

I installed the whole Opentrader which might need OTMMql4Py. I tried the Mql4ZMQtestEA, it works well. When I tried to load Python related EA or scripts, MT4 crashed immediately. I think it is a incompatible version of python related issues. Any idea how to identity or solve this problem?

OTLibPy24.mq4: TerminalPath() returns wrong directory (Win7/MT4 1198)

Hi there,

installing MT4 (newer versions?) into the default directory creates the terminal data folder (MQL4, logs, etc.) inside the users AppData folder. While TerminalPath() returns the directory of your MetaTrader 4 installation, what you actually need to make OTMql4Py work is the data folder path. Therefore i'd suggest to exchange TerminalPath() with TerminalInfoString(TERMINAL_DATA_PATH) to get the expected path.

cheers

Pythonic "trading functions" API

I think it would be nice to have a python style api just like TradePlatform.NET has a C# wrapper over trading functions:

https://tradeplatform.codeplex.com/SourceControl/latest#TradePlatform.MT4.SDK/TradePlatform.MT4.SDK.API/TradingFunctions.cs

This python api could be used both in embedded python and have an implementation that runs externally that uses zeromq to send the commands.

I know about do_order perhaps this api could just call do_order?:
https://github.com/OpenTrading/OpenTrader/blob/6b9625ec2b672ba73f0b846913a3d52ae1f1b659/OpenTrader/OTCmd2.py#L789

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.