• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:37pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:37pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Python Trader code and skills sharing 54 replies

embedding python 19 replies

Monty python and the holy grail 4 replies

Upcoming MetaTrader5 with MQL5 3 replies

Python or Perl? 17 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 9
Attachments: Metatrader5 and Python
Exit Attachments

Metatrader5 and Python

  • Last Post
  •  
  • Page 1 23 4
  • Page 1 23 4
  •  
  • Post #1
  • Quote
  • First Post: Apr 6, 2020 11:37am Apr 6, 2020 11:37am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
MetaQuotes is now supporting python integration with its new MT5 builds. MetaTrader5 (pypi) is the official python package for terminal API access. Since metaquotes has implemented the python functions in C, there is a lot of missing "pythonic" constructs (IMO), and to bridge the gap I have made a pythonic adapter package which is also available on pypi named pymt5adapter.

In order to avoid continual thread updates and outdated information please keep on eye on pymt5adapter development on github and pypi.
  • Post #2
  • Quote
  • Apr 6, 2020 11:44am Apr 6, 2020 11:44am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Here is a quick example of making an asynchronous trade copier using pymt5adapter.

script.py
Inserted Code
import json
import time
from concurrent.futures.process import ProcessPoolExecutor
from typing import List
import pymt5adapter as mt5
from pymt5adapter import as_dict_all
from pymt5adapter.order import Order
from pymt5adapter.symbol import Symbol

def get_position_map(positions: List[dict]):
    position_map = {}
    for p in positions:
        position_map.setdefault(p['symbol'], {}).setdefault('positions', []).append(p)
        v = -p['volume'] if p['type'] else p['volume']
        inner = position_map[p['symbol']]
        inner['net_volume'] = inner.get('net_volume', 0.0) + v
    return position_map

def match_positions(terminal, positions):
    result_positions = []
    incoming = get_position_map(positions)
    with mt5.connected(**terminal):
        my_pos_map = get_position_map(as_dict_all(mt5.positions_get()))
        for symbol, d in incoming.items():
            if symbol not in my_pos_map:
                volume = d['net_volume']
            else:
                volume = d['net_volume'] - my_pos_map[symbol]['net_volume']
            if volume == 0.0:
                continue
            symbol = Symbol(symbol)
            order = Order.as_buy() if volume > 0.0 else Order.as_sell()
            order(volume=abs(volume), symbol=symbol.name)
            for _ in range(5):
                symbol.refresh_rates()
                price = symbol.ask if volume > 0.0 else symbol.bid
                res = order(price=price).send()
                if res.retcode == mt5.TRADE_RETCODE_DONE:
                    result_positions.append(as_dict_all(res))
                    break
    return result_positions

def main():
    with open('terminal_config.json') as f:
        terminals = json.load(f)
    master = terminals['master']
    slaves = terminals['slaves']
    with mt5.connected(**master), ProcessPoolExecutor() as pool:
        while True:
            positions = [as_dict_all(mt5.positions_get())] * len(slaves)
            results = list(pool.map(match_positions, slaves, positions))
            for result in results:
                for sub in result:
                    if sub:
                        print(sub)
            time.sleep(0.01)

if __name__ == "__main__":
    main()

terminal_config.json
Inserted Code
{
  "master": {
    "path":"C:\\Users\\nicho\\Desktop\\terminal1\\terminal64.exe",
    "portable": true
  },
  "slaves": [
    {
      "path": "C:\\Users\\nicho\\Desktop\\terminal2\\terminal64.exe",
      "portable": true
    },{
      "path": "C:\\Users\\nicho\\Desktop\\terminal3\\terminal64.exe",
      "portable": true
    }
  ]
}
4
  • Post #3
  • Quote
  • Apr 6, 2020 12:49pm Apr 6, 2020 12:49pm
  •  Jagg
  • Joined Oct 2006 | Status: Member | 455 Posts | Online Now
Thanks for the heads up and nice to see a new posting from you here
1
  • Post #4
  • Quote
  • Apr 6, 2020 1:07pm Apr 6, 2020 1:07pm
  •  mntiwana
  • Joined Mar 2013 | Status: Member | 1,665 Posts
Thanks Nicholishen
Indicator is just a supportive tool-Use it only if it can benefit you
1
  • Post #5
  • Quote
  • Apr 7, 2020 10:50am Apr 7, 2020 10:50am
  •  rockit
  • Joined Oct 2013 | Status: Member | 816 Posts
Quoting Nicholishen
Disliked
MetaQuotes is now supporting python integration with its new MT5 builds.
Ignored
Do you have an insight into the mechanism ("the ability to integrate with other solutions for processing financial data"), how to use i.e. with c++? Is it any different to using a script/ea to bridge communication to outside?
..
  • Post #6
  • Quote
  • Edited at 3:41pm Apr 7, 2020 3:25pm | Edited at 3:41pm
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting rockit
Disliked
{quote} Do you have an insight into the mechanism ("the ability to integrate with other solutions for processing financial data"), how to use i.e. with c++? Is it any different to using a script/ea to bridge communication to outside?
Ignored
AFAIK, this is the only officially supported direct API access to the terminal itself. Metaquotes has implemented their python API in C so it's ridiculously fast. With older methods of establishing a zeroMQ connection running inside a loop inside of an EA -- you'd constantly have to poll the queue for new messages and pass them back and forth. With the new API, the terminal responds directly to the request and the average round-trip for a tick update request is around 20 microseconds.

Inserted Code
import pymt5adapter as mt5
from time import perf_counter_ns
with mt5.connected():
    count = 100
    begin = perf_counter_ns()
    for i in range(count):
        _ = mt5.symbol_info_tick("EPM20")
    end = perf_counter_ns()
    avg = (end - begin) / count
    print(f"Average time to complete = {round(avg / 1_000, 3)} microseconds")
Average time to complete = 16.958 microseconds
2
  • Post #7
  • Quote
  • Edited at 6:46am Apr 8, 2020 6:01am | Edited at 6:46am
  •  rockit
  • Joined Oct 2013 | Status: Member | 816 Posts
Quoting Nicholishen
Disliked
{quote} AFAIK, this is the only officially supported direct API access to the terminal itself.
Ignored
Yes, it looks that way; and it is a bizarre fact in itself. Obviously MQ felt pressured to open the terminal a little bit, but not more than necessary. A language agnostic solution would be desirable, but the guys from MQ are quite unique..

I tried your example to test the speed versus the solution I use. For me the py script takes on average 60 µs; my (C/C++) solution based on named shared memory and event objects (->no polling) for synchronization takes on average 30 µs. However, the py version is more elgant. I also transfer depth of market data etc.
..
1
  • Post #8
  • Quote
  • Apr 8, 2020 9:11am Apr 8, 2020 9:11am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting rockit
Disliked
{quote} For me the py script takes on average 60 µs; my (C/C++) solution based on named shared memory and event objects (->no polling)
Ignored
How is that achieved? Are you sending a certain chart event to trigger the EA?
  • Post #9
  • Quote
  • Apr 8, 2020 10:41am Apr 8, 2020 10:41am
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,420 Posts
Quoting Nicholishen
Disliked
{quote} How is that achieved? Are you sending a certain chart event to trigger the EA?
Ignored
I think he is talking about this

https://docs.microsoft.com/en-us/win.../event-objects
Try don't lose pants never...
BtB Auto Pips This Week: -2,173
  • Post #10
  • Quote
  • Apr 8, 2020 12:29pm Apr 8, 2020 12:29pm
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting braintheboss
Disliked
{quote} I think he is talking about this https://docs.microsoft.com/en-us/win.../event-objects
Ignored
Yeah, but this would require an EA running on an infinite loop, would it not?
  • Post #11
  • Quote
  • Edited at 6:27pm Apr 8, 2020 12:57pm | Edited at 6:27pm
  •  braintheboss
  • Joined Nov 2012 | Status: Coder | 8,420 Posts
If im not wrong event objects can lock until receive new event. Then maybe is the way he is using but that means expert will be paused until event arrive
Try don't lose pants never...
BtB Auto Pips This Week: -2,173
  • Post #12
  • Quote
  • Edited at 1:52pm Apr 8, 2020 1:32pm | Edited at 1:52pm
  •  rockit
  • Joined Oct 2013 | Status: Member | 816 Posts
Quoting Nicholishen
Disliked
{quote} How is that achieved? Are you sending a certain chart event to trigger the EA?
Ignored
The event object(s) is/are signaled, then execution on the other side will proceed, if made to wait for.
A window message (even WM_COPYDATA) can be sent from MT to the other side, but not the other way around.
Here is an example script for the MT5 that works for me (Windows 10 64):
Inserted Code
// mt5 script author: rockit
#include <WinAPI\winapi.mqh>
#define INFINITE                0xFFFFFFFF
#define WAIT_OBJECT_0           0
#define EVENT_ALL_ACCESS        0x1F0003
#define BUFSIZE                 1024
#define INVALID_HANDLE_VALUE    -1
#define PAGE_READWRITE          4
#define FILE_MAP_ALL_ACCESS     983071
#import "kernel32.dll"
    HANDLE CreateEventA(PVOID, uint, uint, const char&[]);
    HANDLE SetEvent(HANDLE);
    uint WaitForSingleObject(HANDLE, uint);
#import "msvcrt.dll"
    int memcpy(PVOID, MqlTick&, uint);
#import
char           event1[];
char           event2[];
const string   nsm = "nsm";
HANDLE         hmapfile = 0;
HANDLE         mt5 = 0;
HANDLE         my = 0;
PVOID          pmem = 0;
MqlTick        tick;
void OnStart()
{
    StringToCharArray("mt5", event1);
    StringToCharArray("my", event2);
    mt5 = CreateEventA(NULL, 0, 0, event1);
    my = CreateEventA(NULL, 0, 0, event2);
    hmapfile = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, BUFSIZE, nsm);
    pmem = MapViewOfFile(hmapfile, FILE_MAP_ALL_ACCESS, 0, 0, BUFSIZE);
    if(mt5 != 0 && my != 0 && hmapfile != 0 && pmem != 0)
    {
        while(!IsStopped())
        {
            uint dwresult = WaitForSingleObject(mt5, INFINITE);
            if(dwresult == WAIT_OBJECT_0)
            {
                SymbolInfoTick(NULL, tick);
                memcpy(pmem, tick, sizeof(MqlTick));
                SetEvent(my);
            }
        }
    }
    UnmapViewOfFile(pmem);
    CloseHandle(hmapfile);
    CloseHandle(mt5);
    CloseHandle(my);
}
A simple C/C++ adapter looks like below (this is made with the tiny c compiler tcc ). Caveat: The mt5 script has to be attached first. For the sake of demonstration and speed, the wait function will not return prior to the signal being raised, thus when detached, the terminal may hang (also the other side can be run again to break the wait).
Inserted Code
#include <windows.h>
#include <stdio.h>
#define BUFSIZE 1024
#define CYCLES 1000
typedef struct MqlTick
{
    ULONGLONG    time;          // Time of the last prices update
    double       bid;           // Current Bid price
    double       ask;           // Current Ask price
    double       last;          // Price of the last deal (Last)
    ULONGLONG    volume;        // Volume for the current Last price
    LONGLONG     time_msc;      // Time of a price last update in milliseconds
    UINT         flags;         // Tick flags
    double       volume_real;   // Volume for the current Last price with greater accuracy
} Tick;
const char  event1[] = "mt5";
const char  event2[] = "my";
const char  nsm[] = "nsm";
HANDLE      hmapfile = 0;
HANDLE      mt5 = 0;
HANDLE      my = 0;
PVOID       pmem = 0;
int main()
{
    mt5 = CreateEventA(NULL, 0, 0, event1);
    my = CreateEventA(NULL, 0, 0, event2);
    hmapfile = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, BUFSIZE, nsm);
    pmem = MapViewOfFile(hmapfile, FILE_MAP_ALL_ACCESS, 0, 0, BUFSIZE);
    if(mt5 != 0 && my != 0 && hmapfile != 0 && pmem != 0)
    {
        ULONGLONG StartingTime, EndingTime, ElapsedMicroseconds;
        ULONGLONG Frequency;
        QueryPerformanceFrequency(&Frequency);
        QueryPerformanceCounter(&StartingTime);
        for(int i = 0; i < CYCLES; ++i)
        {
            SetEvent(mt5);
            unsigned int dwresult = WaitForSingleObject(my, INFINITE);
            if(dwresult == WAIT_OBJECT_0)
            {
                // read data, i.e.:
                // printf("%.5f\n", ((Tick*) pmem)->bid);
            }
        }
        QueryPerformanceCounter(&EndingTime);
        ElapsedMicroseconds = EndingTime - StartingTime;
        // We now have the elapsed number of ticks, along with the
        // number of ticks-per-second. We use these values
        // to convert to the number of elapsed microseconds.
        // To guard against loss-of-precision, we convert
        // to microseconds *before* dividing by ticks-per-second:
        ElapsedMicroseconds *= 1000000;
        ElapsedMicroseconds /= Frequency;
        printf("\nMICROS ELAPSED: %u\n", ElapsedMicroseconds / CYCLES);
    }
    else puts("failed!...");
    UnmapViewOfFile(pmem);
    CloseHandle(hmapfile);
    CloseHandle(my);
    CloseHandle(mt5);
    return 0;
}
..
  • Post #13
  • Quote
  • Edited at 4:41pm Apr 8, 2020 4:24pm | Edited at 4:41pm
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting rockit
Disliked
{quote} For me the py script takes on average 60 µs; my (C/C++) solution based on named shared memory and event objects (->no polling) for synchronization takes on average 30 µs. However, the py version is more elgant. I also transfer depth of market data etc.
Ignored
I agree, I'd take python plus a few extra microseconds over C++ any day. Although, I wasn't able to replicate the latency you posted. I retested on my ultrabook running in "battery saver mode" and the slowest time it posted was 24 µs -- 15µs avg when running in best performance mode.

Python 3.8.2 with terminal build 2375
  • Post #14
  • Quote
  • Edited at 3:17am Apr 10, 2020 12:21am | Edited at 3:17am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
A new calendar event module has been added to the pymt5adapter package. Use it to retrieve economic calendar events from mql5.com. There's a lot of python "magic" used in the calendar_events function which allows you call it however you feel works best with your program. Some examples:

Inserted Code
from datetime import datetime
from datetime import timedelta
import pymt5adapter as mt5
from pymt5adapter.calendar import calendar_events
from pymt5adapter.calendar import Currency
from pymt5adapter.calendar import Importance
 
def forex_symbol(s):
    modes = [mt5.SYMBOL_CALC_MODE_FOREX, mt5.SYMBOL_CALC_MODE_FOREX_NO_LEVERAGE]
    return s.trade_calc_mode in modes
 
def main():
    symbol = mt5.symbols_get(function=forex_symbol)[0]
    one_week = timedelta(weeks=1)
    now = datetime.now()
    default_one_week_ahead_all_events = calendar_events()
    filtered_by_callback = calendar_events(function=lambda e: 'fed' in e['event_name'].lower())
    filtered_by_flags = calendar_events(importance=Importance.MEDIUM | Importance.HIGH,
                                        currencies=Currency.USD | Currency.JPY)
    filtered_by_strings = calendar_events(importance='medium high',
                                          currencies='usdjpy')
    filtered_by_iterables = calendar_events(importance=('medium', ' high'),
                                            currencies=('usd', 'jpy'))
    filtered_by_specific_times = calendar_events(time_from=now, time_to=now + one_week)
    filtered_by_timedeltas = calendar_events(time_from=(-one_week), time_to=one_week)
    filtered_by_timedelta_lookback = calendar_events(-one_week)
    calendar_events_in_russian = calendar_events(language='ru')
    employment_events_next_month = calendar_events(
        currencies=Currency.USD,
        importance=Importance.HIGH
        # function=lambda e: 'employment' in (name:=e['event_name'].lower()) or 'payroll' in name
    )
    next_event = employment_events_next_month[0]
    for k, v in next_event.items():
        print(k, v)
 
if __name__ == '__main__':
    with mt5.connected():
        main()
1
  • Post #15
  • Quote
  • Edited at 4:49am Apr 10, 2020 4:14am | Edited at 4:49am
  •  rockit
  • Joined Oct 2013 | Status: Member | 816 Posts
Quoting Nicholishen
Disliked
{quote} I agree, I'd take python plus a few extra microseconds over C++ any day. Although, I wasn't able to replicate the latency you posted. I retested on my ultrabook running in "battery saver mode" and the slowest time it posted was 24 µs -- 15µs avg when running in best performance mode. Python 3.8.2 with terminal build 2375
Ignored
What I did not understand so far is - can the mt5 terminal initiate data transfer to the python app ("push data", i.e. incomming ticks), or you need to poll? I think you have to poll data. Also you can only transfer certain data and not arbitrary stuff?
Reg. the latency. I use a low-power system (a 4 core [email protected])..
Attached Image (click to enlarge)
Click to Enlarge

Name: py1.png
Size: 35 KB
..
  • Post #16
  • Quote
  • Edited at 10:59am Apr 10, 2020 10:36am | Edited at 10:59am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting rockit
Disliked
{quote} What I did not understand so far is - can the mt5 terminal initiate data transfer to the python app ("push data", i.e. incomming ticks), or you need to poll? I think you have to poll data. Also you can only transfer certain data and not arbitrary stuff? Reg. the latency. I use a low-power system (a 4 core [email protected]).. {image}
Ignored
Yes, you have to poll, but one way or another you have to run a script in a loop (python or MQL). Right now you can request rates, ticks, and order information. The only thing it's missing is book data, but I find book data to be pretty useless with all the quote stuffing and spoofing still going on. Real exchange volume (futures) come with the tick data anyway. As far as the latency, I think your hardware might be responding to the python overhead or perhaps you're running an older terminal build. You should be able to lower the latency by using the MQL builtin C-functions directly because all the pymt5adapter functions are wrapped into a decorator so the context manager can modify the API behavior on the global scale. I added a direct pointer to the MQL function (symbol_info_tick_fast) in the newest release of pymt5adapter
Inserted Code
pip install -U pymt5adapter
but for something that's mission critical, you should be able to use pymt5adapter for development and then change the import statement to MetaTrader5 when you're ready for production.


Attached Image (click to enlarge)
Click to Enlarge

Name: Annotation 2020-04-10 103041.jpg
Size: 95 KB
  • Post #17
  • Quote
  • Edited at 11:44am Apr 10, 2020 11:31am | Edited at 11:44am
  •  rockit
  • Joined Oct 2013 | Status: Member | 816 Posts
Quoting Nicholishen
Disliked
{quote} Yes, you have to poll, but one way or another you have to run a script in a loop (python or MQL).
Ignored
Ok, yeah, I do not need to poll and so the cpu is not burdened. I use the script for transmitting instructions app -> mt5 (or mt4 - works the same way); for realtime incomming data (i.e. ticks or change of dom) I use another ea or indicator to write the data to the shared memory when it happens and then signal back, that data is ready (in my case a PostMessage(..) to a window's message queue). And this is where (I guess), when you want to do things in real time (and when every 'millisecond' counts - I do realtime charting and stuff), Python will start to drag.. I wonder how Cython would perform.
..
  • Post #18
  • Quote
  • Edited at 6:43pm Apr 10, 2020 5:23pm | Edited at 6:43pm
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting rockit
Disliked
{quote} Ok, yeah, I do not need to poll and so the cpu is not burdened.
Ignored
In my testing, both (python and MQL) scripts consume the same CPU when running an infinite loop without sleep.
Inserted Code
void OnStart() {
   while(!IsStopped());
}
Attached Image (click to enlarge)
Click to Enlarge

Name: mql inf.jpg
Size: 42 KB

Inserted Code
while True:
    pass
Attached Image (click to enlarge)
Click to Enlarge

Name: py inf.jpg
Size: 44 KB


Your EA script is polling on each loop
Inserted Code
while(!IsStopped()) {
    uint dwresult = WaitForSingleObject(mt5, INFINITE);
    if(dwresult == WAIT_OBJECT_0) {
        SymbolInfoTick(NULL, tick);
        memcpy(pmem, tick, sizeof(MqlTick));
        SetEvent(my);
    }
}
...so IMO, it's really six of one half-dozen of the other. (unless there's something I'm missing)
Quote
Disliked
I wonder how Cython would perform.
All of the libraries I use are implemented in C and expose python bindings. Python is just gluing them together. Here's an example using MetaTrader5 (C) and TA-lib (C) to get rates and calculate BBands using pymt5adapter as the glue (pythonic interface). This test completed in 63 µs on my machine.

Inserted Code
import functools
import time
import MetaTrader5 as mt5
import pymt5adapter as mta
import talib
from pymt5adapter.symbol import Symbol
 
def timeit(f):
    @functools.wraps(f)
    def timeit_wrapper(*args, **kwargs):
        timed = time.perf_counter_ns()
        res = f(*args, **kwargs)
        timed = time.perf_counter_ns() - timed
        return timed, res
    return timeit_wrapper
 
@timeit
def get_bb(symbol):
    rates = mt5.copy_rates_from_pos(symbol, mt5.TIMEFRAME_H1, 0, 5)
    bb = talib.BBANDS(
        rates['close'],
        timeperiod=5,
        nbdevup=2,
        nbdevdn=2,
        matype=0
    )
    return bb
 
def main():
    symbol = Symbol("EURUSD")
    ttc, bb = get_bb(symbol.name)
    for val, name in zip((b[-1] for b in bb), 'high medium low'.split()):
        print(f"{name} = {symbol.normalize_price(val)}")
    print(f'Time to complete = {ttc / 1000: .3f} µs')
 
if __name__ == '__main__':
    with mta.connected():
        main()

Attached Image (click to enlarge)
Click to Enlarge

Name: Annotation 2020-04-10 172243.jpg
Size: 116 KB


To put that into perspective, here is the same test in pure MQL:
Inserted Code
#include <indicators/indicators.mqh>
CiBands* get_bb(string symbol) {
   static CiBands bb;
   if (symbol != bb.Name()) {
      bb.Create(symbol, PERIOD_H1, 5, 0, 2.0, PRICE_CLOSE);
   }
   bb.Refresh();
   return &bb;
}
void OnStart() {
   ulong timed = GetMicrosecondCount();
   CiBands *bb = get_bb("EURUSD");
   timed = GetMicrosecondCount() - timed;
   printf("Time to complete = %.3f", timed);
}
Time to complete = 100451.000 µs

The python version is over 1500 times faster than the pure MQL version!
  • Post #19
  • Quote
  • Apr 28, 2020 8:38pm Apr 28, 2020 8:38pm
  •  newhope
  • | Joined Mar 2018 | Status: Member | 72 Posts
Quoting Nicholishen
Disliked
MetaQuotes is now supporting python integration with its new MT5 builds. MetaTrader5 (pypi) is the official python package for terminal API access. Since metaquotes has implemented the python functions in C, there is a lot of missing "pythonic" constructs (IMO), and to bridge the gap I have made a pythonic adapter package which is also available on pypi named pymt5adapter. In order to avoid continual thread updates and outdated...
Ignored
Hi Nicholishen,
This is great ... but if i understand it correctly, it is only for MT5 (not MT4), and only works in Windows platform ??
  • Post #20
  • Quote
  • Apr 29, 2020 10:57am Apr 29, 2020 10:57am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting newhope
Disliked
{quote} Hi Nicholishen, This is great ... but if i understand it correctly, it is only for MT5 (not MT4), and only works in Windows platform ??
Ignored
Correct. Only for MT5 and Windows.
1
  • Platform Tech
  • /
  • Metatrader5 and Python
  • Reply to Thread
    • Page 1 23 4
    • Page 1 23 4
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021