仕事が完了した
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
I want you to create for a class in python that is constructed by a username and password of the mt4 account plus all the necessary authentications needed to connect to MT4 broker. Please be advised that the python code will be running from a cloud machine on an Ubuntu machine so there is no MT4 terminal running to it in windows. The class has the following methods:
1) Connect to broker as defined in the class constructor.
2) Check the account balance, equity, available balance, pretty much anything has to do with the balance.
3) Get current open trades details with entry price, pnl, position size ... etc
3) Read the current and latest N number of candles identified by time frame and market instrument from the connected broker, last N-candles.
4) Cancel any pending orders including stop loss or take profit, stop market orders, limit orders ...etc. Identified by market instrument.
5) Close current open trade at market price or limit price. Identified by market instrument
6) Open order or position either market, limit, stop market orders and sets stoploss and takeprofit for both long and short.
7) get the available number of lots tradable for any pair. Identified by market instrument
8) Modify an open order entryprice, stop loss and take profit.
What you can do to get this done:
- you can use the Darwanix tutorial to get this done, they have sample code with a clear path to jump start it pretty much what you need is there. Check the following video and the links to the github
* https://www.youtube.com/watch?v=3nM0c2kG_Sw
* https://github.com/darwinex/DarwinexLabs/tree/master/tools
- Need to figure out how to install the MT4 terminal on an ubuntu machine running on an AWS cloud machine. i.e. no UI.