Skip to main content

EAMetatrader

Python Version
OS Support
GitHub

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,Color
from EAMetatrader.Enums import *
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
Price = 1.18
SL = 1.17800
TP = 1.18400
Slippage = 5
Comment = "EAMT"
Magic = 2222
Expiration = datetime.datetime(2021,3,25)
color = Color()

Order = client.OrderSend("EURUSD",TradeOperation.OP_BUY,Lot,Price,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

PyPal

Bitcoin: 1LsuAxGGdfH43YpgSjY8CSZdX45r4BE4jx

QRCode

Metadata

Release files for EAMetatrader 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EAMetatrader 1.0.4
File Size Uploaded
EAMetatrader-1.0.4.tar.gz 867.9 kB Details

Release files / EAMetatrader-1.0.4.tar.gz

Download URL EAMetatrader-1.0.4.tar.gz
Size 867.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4b48f48990d88cc38264c526df060c840cd5c596cfbce2274afa301aec1617f3
BLAKE2b-256 checksum
How to use checksums
79bb8395262543ad868881113587c020d0c70ba0661805bd250c83465b0f5ced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.5.0.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

1.0.4 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page