EAMT
MetaTrader Library for Python
Install / Use
/learn @EAScript/EAMTREADME
EAMT
Metatrader library for python powered by MtApi
This library currently only supports MetaTrader 4
Installation
- Install the library with the
pip install EAMetatradercommand - Copy and run the
MtApi.ex4file in MetaTrader software - Set up a
portin 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
Donating
Bitcoin: 13fWKBESm6pqtCQzp3WgBarcmxFNv5aCXf
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
106.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
345.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
