Table of Contents
An automated trading system (ATS), a subset of algorithmic trading, uses a computer program to create buy and sell orders and automatically submits the orders to a market center or exchange.The computer program will automatically generate orders based on predefined set of rules using a trading strategy which is based on technical analysis, advanced statistical and mathematical computations or input from other electronic sources.
- Should allow users to input parameter properties like stop loss and take profit etc.
- Expert system should be able to automatically open trades, manage, scale trades and manage trades.
- Trading bot must also be able to manage trades in terms of trailing profit, scaling position, maintaining long and short trading
Taking all above into consideration, the traditional architecture of the entire automated trading system can now be broken down into:
The exchange(s)
– the external world
The server
- Receives market data
- Stores the market data
- Store orders generated by the user
Application
- Takes inputs from the user initially for the decisions such as stop loss, limits, the preferred financial instrument for trading etc.
- Acts as an interface for viewing the information including the data and orders
- Acts as an order manager sending orders to the exchange
The market data
, that is received, typically informs
the automated trading system of the latest order book.
It may also contain some additional information like the volume traded
so far, the last traded price,
and the quantity of the trading order
. However, to make a decision based on the data
, the automated system looks at
the old values or derives certain patterns
from the history. Based on this historical analysis of data and patterns,
the system goes forward to create a trading strategy
and execute the same.
Last but not least, a GUI interface is needed for the trader to view all this information on a screen.
System was written in Meta Quotes 4
, language that is supported by Meta trader 4
:
You should have the below software installed in your pc :
- Meta Trader 3
- Meta Quotes 3
- and your preferred IDE or text editor
-
Get a free API Key at https://github.com/settings/tokens
-
Clone the repo
git clone https://github.com/kudzaiprichard/ubot-mt4
-
Inside meta editor click on
file
, and chooseopen data folder
-
Open mql4 folder
, and copyExperts/ ubot
mql4 source file toExperts folder
-
Copy
Include/Ubot
folder to include folder -
Copy
indicators/Ubot
folder to indicators folder -
Close and
open meta editor
then openubot mql4 source file
andrun it
NB: An
ubot complied ex4
file program will be created -
The same complied
ubot ex4 file
will appear inmeta trader 4
NB: Use that complied
ubot file
to run your bot on the market or test it inmt4 strategy tester
-
Open meta trader 4
-
Drag and drop the bot in desired chart to run the bot
-
The following bot
interface
will show -
Double tap on the
Inputs
tab -
Enter desired
inputs settings
for your bot or import settings and pressok
button -
The bot will then run and will display the interface screen when running successfully
NOTE: Bot should display that dashboard at the far right bottom corner
Below is the UML design of the system including relationships between the difference objects that make up the system
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Your contributions are always welcome and appreciated. Following are the things you can do to contribute to this project.
-
Report a bug
If you think you have encountered a bug, and I should know about it, feel free to report it here and I will take care of it. -
Request a feature
You can also request for a feature here, and if it will viable, it will be picked for development. -
Create a pull request
It can't get better than this, your pull request will be appreciated by the community. You can get started by picking up any open issues from here and make a pull request.
If you are new to open-source, make sure to check read more about it here and learn more about creating a pull request here.
Distributed under the MIT License. See
LICENSE.txt
for more information.
Kudzai P Matizirofa - linkedin.com/in/kudzai-prichard - kudzaiprichard@gmail.com
Project Link: https://github.com/kudzaiprichard/ubot-mt4
list of resources I found helpful and would like to give credit to.