This library currently only supports MetaTrader 4
- 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
fromEAMetatraderimportMT4ClientfromEAMetatrader.Enumsimport*fromEAMetatrader.UsingimportColorimportdatetimeclient=MT4Client(True)
client.Connect(8222)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))Symbol="EURUSD"Timeframe=60Period=14Appliedprice=0#CloseShift=0RSI=client.iRSI(Symbol,Timeframe,Period,Appliedprice,Shift)Lot=0.01Ask=client.MarketInfo("EURUSD",MarketInfoModeType.MODE_ASK)
SL=Ask-0.002TP=Ask+0.004Slippage=5Comment="EAMetatrader"Magic=2222Expiration=datetime.datetime(2021,3,25)
color=Color()
Order=client.OrderSend("EURUSD",TradeOperation.OP_BUY,Lot,Ask,Slippage,SL,TP,Comment,Magic,Expiration,color.Green())- Debug some functions
- Write MT5Client class
- Development of functions for working with artificial intelligence
If you have a question or want to report a bug, send it in this section
Bitcoin: 13fWKBESm6pqtCQzp3WgBarcmxFNv5aCXf