Algorithmic trading walkthrough

Page 1

TribanerCorp ALGORITHMIC TRADING WALKTHROUGH: FROM START TO FINISH Whether you have never traded before, started trading manually, having someone trade an account for you or are already creating your own algorithms, this article will help guide you from start to finish and is packed full of great resources which will help you improve your techniques and therefore your returns.

Where to start? For those who have not traded before or are relatively new to it all, here’s how you get started in trading forex, commodities and index markets. First, you need a trading platform and broker to allow you to access financial market data and place orders into the market electronically. Once you have the software installed, you can then create a demo account which allows you to practice your skills either manually or via algorithmic trading. Opening a demo account means you are able to access financial data (fully customisable charts, indicators and more) on markets such as AUD/USD (Aussie or Australian Dollar), USD/JPY, EUR/GBP along with a range of smaller markets such as the USD/ZAR (South African Rand). On top of forex markets, you will also have access to Oil, Cotton, Coffee, Sugar, Gold, Silver, Copper.. Then there’s the stock index markets, which include the top number of shares of that market. For example the AUS200 comprises of the top 200 companies in the Australian Stock Exchange (ASX) and is essentially a calculation of the value of those companies in a bundle. Once you have the platform, and therefore access to data history and testing software you can begin learning and working on your coding skills and trading abilities. The MetaEditor software is used to create your code and then files are then available or testing and live trading in your MetaTrader 4 platform. Writing Your Code


MetaEditor is the software that is used to write and edit code for your algorithms. You can use MetaEditor to create indicators, scripts and expert advisors to suit your needs. In order to write automated trading systems, you would use the Expert Advisor option. There are also some great resources to help you learn to write your own trading robot from scratch and also a template that you can simply input parts of code and the rest of the trade is managed already.

Why does it work?

Although consistent profits can be made by manually trading, it takes a huge amount of dedication to firstly reach a level where you are profitable and a whole lot more dedication to maintain the focus to continue earning profits long term. One of the most common reasons people do not succeed is due to a lack of consistency with what they do. Chopping, changing and never really getting a consecutive and reliable set of data to reflect on have big impact on trader’s ability to move forward. In saying this, there are loads of manual traders out there that make good money, consistently. On the flip side, you have the potential to create and develop your very own trading robot based on criteria you set. Not only that, you can run tests, essentially asking the market data questions, receive answers and use those answers to trade the market automatically. The best part is, once the hard work is done (i.e. finding your strategy, writing your code, testing and optimizing and implementing to a live account), you can essentially sit back and collect the income. Of course, it is very important to check results and ensure everything is functioning correctly.

Operating 24 hours a day

A VPS or Virtual Private Server is what is used to run algorithmic trading software on a 24 hour basis and reduces the risk of hardware overheating, updates, shutdowns not to mention power outages, internet outages and so on. Using a VPS gives a higher degree of certainty that your algorithms run constantly with as little downtime as possible. The benefit of this is you don’t miss trades and therefor have a more accurate data set for your trading results. MQL4

The integrated programming language used to write algorithms is called MQL4 and the syntax is similar to that of the C++. There are many functions which you can utilise a variety of parameters to create your trading system. From bollinger bands and moving averages, to volume and change in prices you can use indicators to be the basis of when you enter a trade. You can also set the code to trade at certain times of the day, days of the week and more without the need to manually put the expert advisor (EA) on and off the chart. You can even call data and information from external sources such as a txt file that can be checked against parameters set in your code.


Skills You Will Learn

The obvious one is how to code. You will learn how to write code that makes things happen in the MT4 platform, whether its placing orders based on criteria you have set or sending an alert right to your smartphone. You will also learn how to test code and systems that you create. Understanding errors and how to fix them, as well as how to solve basic and complex problems to ensure your code works exactly how you want it to. Discipline and focus will increase as you create new systems, scour through data and analyse back and forward tested results. Understanding how your code interacts with software and information in different situations. Initial Testing

One of the most tedious parts of getting your algorithm up and running is testing, tweaking and ensuring it all works. Initially, testing that the code is working in general, if it is not placing any trades in a period that you would expect trades to be places, something needs to be checked in the code. The next step is to make sure the trades are placing at the time and parameters you are expecting it to and in the right direction. Testing the management of the trade will be different depending on whether you have set Take Profits and/or Stop Losses or if you have trailing stops or move stops to break even.

Common issues to look out for

Demo accounts can often be misleading for a variety of reasons. One reason is stop losses will count at the price of the stop even if there is gapping (when price opens the following day or periods of low market depth where price is not fluid). This means that on a real account you would lose more than the stop loss as the broker would not fill your order at your stop, but at the price at which it is recognised outside of the stop. Next, if your system brings in a break even, it is important to know the minimum distance from market price (i.e. a stop cannot be adjusted to anything closer than 5 points on a symbol). If there is no minimum, this can also present an issue if the price is too close and the price can easily be clipped and taken out before it has a chance to move into further profit. This is something that can be difficult to see unless you watch how the trade reacts in real time. One way to do this is to set an alert to your phone when the trade is opened or the stop loss is adjusted and watch what happens. For More Details Visit: TribanerCorp | Personal and Professional Development


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.