What is Algorithmic trading?
Algorithmic trading uses computers to program a defined set of instructions for placing a trade in order. It is often used by banks, pension funds, mutual funds and hedge funds, and it was developed as a cost saving mechanism, because institutional traders need to executive large orders in markets that can not support all of the size at once. By setting by variables such as time, price, and volume, computers(algorithmic trading robot) can watch the stock market constantly and execute traders, whenever the conditions are met. Another benefit of algorithmic trading is that human trader does not have to watch the stocks constantly and repeatedly, which saves time for them to work on other projects. Since computers processes information at a higher speed and thus higher frequency, algorithmic trading generates more profits than a human trader.
How do you build a algorithmic trading robot?
MetaTrade4(MT4) is an electronic trading platform that uses the MetaQuotes Language 4 (MQL4) for coding trading strategies. It is one of the popular softwares to build a algorithmic trading robot.
I will show you part of an example below with the free and open-source Quantiacs Toolbox which supports both Python and MATLAB by building a Heikin-Ashi indicator.
def HEIKIN(O, H, L, C, oldO, oldC):
HA_Close = (O + H + L + C)/4
HA_Open = (oldO + oldC)/2
elements = numpy.array([H, L, HA_Open, HA_Close])
HA_High = elements.max(0)
HA_Low = elements.min(0)
out = numpy.array([HA_Close, HA_Open, HA_High, HA_Low])
return out
Heikin-Ashi Candle Calculations HA_Close = (Open + High + Low + Close) / 4 HA_Open = (previous HA_Open + previous HA_Close) / 2 HA_Low = minimum of Low, HA_Open, and HA_Close HA_High = maximum of High, HA_Open, and HA_Close
Heikin-Ashi Calculations on First Run HA_Close = (Open + High + Low + Close) / 4 HA_Open = (Open + Close) / 2 HA_Low = Low HA_High = High
This is the beginning part of the code and you can read more from this link: https://quantiacs.com/Blog/Intro-to-Algorithmic-Trading-with-Heikin-Ashi.aspx.
The code for algorithmic trading is very complex and advanced, but isn't it so encouraging that we start to understand the basics like "array" and "return"? Once, a finance professional told me, "we can teach you about algorithmic trading, as long as you know some basics of the computer science, even if you only took one computer science class. But even that basic knowledge will give you a good starting point." I did not truly understand what he meant until when I wrote this blog and googled the code for algorithmic trading. I open the website, expecting to know nothing about the codes, but I was excited to find that I do understand some basics.
1.https://www.google.com/search?q=algorithmic+trading&biw=1280&bih=625&tbm=isch&source=lnms&sa=X&ved=0ahUKEwiq_fb-zLjPAhUGPCYKHexED24Q_AUICSgE#imgrc=llwEXhaZbAXpnM%3A
2.https://en.wikipedia.org/wiki/Algorithmic_trading#/media/File:Algorithmic_Trading._Percentage_of_Market_Volume.png
Writing References:
1. http://www.investopedia.com/articles/active-trading/101014/basics-algorithmic-trading-concepts-and-examples.asp
2. https://en.wikipedia.org/wiki/Algorithmic_trading
3. http://www.investopedia.com/articles/active-trading/081315/how-code-your-own-algo-trading-robot.asp
4. https://quantiacs.com/Blog/Intro-to-Algorithmic-Trading-with-Heikin-Ashi.aspx
--------------------------------------------------------------------------------------------------------------------------
Check the video below for how the basics of algorithmic trading
Check the video below for how the basics of algorithmic trading


No comments:
Post a Comment