Code Monkey home page Code Monkey logo

eamt's Introduction

EAMT

PyPIPyPI - Downloads
Python Version
OS Support
GitHub
GitHub followersGitHub User's stars

Metatrader library for python powered by MtApi

This library currently only supports MetaTrader 4

Installation

  • Install the library with the pip install EAMetatrader command
  • Copy and run the MtApi.ex4 file in MetaTrader software
  • Set up a port in Expert and Application for network connection
  • and over

Required libraries

from EAMetatrader import MT4Client
from EAMetatrader.Enums import *
from EAMetatrader.Using import Color
import datetime

Connection

client = MT4Client(True)
client.Connect(8222)

Copy Rates

start = datetime.datetime(2021,3,16)
end = datetime.datetime(2021,3,1)

mqlrate = client.CopyRates("EURUSD",ENUM_TIMEFRAMES.PERIOD_H1,start,end)
print(mqlrate.Time(2))

Indicators

Symbol = "EURUSD"
Timeframe = 60
Period = 14
Appliedprice = 0  #Close
Shift = 0

RSI = client.iRSI(Symbol,Timeframe,Period,Appliedprice,Shift)

Send Order

Lot = 0.01
Ask = client.MarketInfo("EURUSD",MarketInfoModeType.MODE_ASK)
SL = Ask - 0.002
TP = Ask + 0.004
Slippage = 5
Comment = "EAMetatrader"
Magic = 2222
Expiration = datetime.datetime(2021,3,25)
color = Color()

Order = client.OrderSend("EURUSD",TradeOperation.OP_BUY,Lot,Ask,Slippage,SL,TP,Comment,Magic,Expiration,color.Green())

TODO

  • Debug some functions
  • Write MT5Client class
  • Development of functions for working with artificial intelligence

Issues

If you have a question or want to report a bug, send it in this section

My social medias

LinkedIn

Instagram

YouTube

Github

Donating

Bitcoin: 13fWKBESm6pqtCQzp3WgBarcmxFNv5aCXf

eamt's People

Contributors

eascript 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

eamt's Issues

How to install MtApi.ex4

Hi !
How to install MtApi.ex4 into metatrader ?
I tried to put file into Experts folder .
When I start metatrader - the file is delete.
Maybe I do smth wrong ?

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.