Giter Site home page Giter Site logo

mt4-tcp's Introduction

mt4-tcp

Winsock bindings for MetaTrader 4 platform to create experts that act as servers. Clients can connect from any other program over the network.

Usage

Example servers are contained within the experts/ folder which run as servers when loaded into MT4. There are also examples for clients that connect to the server under the clients/ folder. The experts can be modified to stream any data and the connection is bidirectional over TCP.

The best way is to create a expert server that streams the data you require and executes the commands your client will require. There is no fixed protocol because every client might need different data.

We recommend installing the git client on Windows for running the bash scripts. On Linux wine is required to run the MT4 terminal. You can mix platforms and run MT4 on Windows and clients elsewhere over the network.

The experts also run for backtesting but create a lot of networking. It is best to backtest locally so the network is not flooded.

Development

This project is highly experimental. It is aimed to be a microframework for conntecting in and out of MT4. The glue script make.sh is used to move files around between the repo and the MT4 expected folders. The library is written in MQL4.

Folder Structure

  • include/ contains the socket library functions.
  • experts/ contain different example servers built using the library.
  • clients/ contain example python scripts that connect to the servers.
  • config/ contains configuration for experts for backtesting

FAQ

  • Why not use make? The aim is to make the code run out of the box on multiple platforms which might not have make installed, in particular Windows.
  • Why doesn't make.sh backtest work when the MT4 is open? MT4 only allows one running instance on single client terminal. Either use multi-terminal MT4 or duplicate your entire MT4 profile folder to have a second one. Note that you must check which profile make.sh picks up on, usually the first one.

Version

0.1.0

mt4-tcp's People

Contributors

nuric avatar

Watchers

James Cloos avatar  avatar

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.