Forex Trading Robot With Technical and F
Forex Trading Robot With Technical and F
Abstract: Nowadays currency trading can be done online through a platform called Meta-Trader4.
MetaTrader 4, also known as MT4, is an electronic trading platform widely used by online retail foreign
exchange speculative traders. It was devel-oped by MetaQuotes Software and released in 2005. Traders can
open market execution (buy or sell) any currency pair just through one mouse click.
Two trading robots that can automate open and close transaction in forex was build in the previous paper
[5]. These robots are designed to analyze the market price based on tools and indicators that are provided
by MT4. This type of analy-sis is called technical analysis. Experiments show that the profit was not optimal
in times of sideways.
The other type of analysis in forex trading is based on forex-related news and events that affect forex trends.
News reports, economic data, and political events that come out about a country is used by the robots to
gain a decision support. This paper build forex robot that analyze forex market based on fundamental
analysis. Fundamental news periodically extracted from a website that provide forex news calendar,
www.forexfactory.com. This calendar is used to know the news impact to the market price. The robot
decisions to open, close, or hold a po-sition are reinforced by the news impact that are parsed from the
website. Exper-iments show that the performance of technical robot is more stable than the fun-damental
robot.
1. Introduction
Compare with other investment instrument, online forex trading has become very popular in the past
decade because it offers traders several advantages. Forex offers high (even unlimited) return on
investment. It can be started with a relatively small amount of capital, but a trader can buy or sell up to 500
times more funds than he actually has. This can be happened when a trader employ leverage. Leverage is an
important weapon in the armoury of Forex benefits. This way one can easily gener-ate more substantial
gains (or losses) even without having a large capital at disposal. Forex is the most liquid market in the
world. There always be a constant supply and demand for money and the market is open 24 hours a day, 5
days a week. This means that traders do not have to adjust schedule for the market opening hours, as the
traders can trade all day long, anywhere at anytime.
MetaTrader 4, also known as MT4, is an electronic trading platform widely used by online retail foreign
exchange speculative traders. It was developed by MetaQuotes Software and released in 2005. Traders can
open market execution (buy or sell) any currency pair just through one mouse click.
In the previous paper [5], two trading robots that can automate open and close transaction in forex was
designed to analyze the market price based on tools and indicators that are provided by MT4. Two
technical indicators that are used in this paper are Simple Moving Average and Moving Average
Convergence Divergence. These robots work based on the crossover of different interval of Simple Moving
Average. Experiments show that traders cannot depend only to the technical analysis based on indicators.
There is no 100% accurate indicator to predict the market prices and trends. Because of this reason,
traders must know the reasons behind the price movement like market sentiment, political events,
economic data, world news that affect the market price. This kind of analysis is called fundamental analysis.
This paper build a robot that work based on fundamental analysis to compare its performance with robot
in [5] that work based on technical analysis. Fundamental news periodically extracted from a forex website,
www.forexfactory.com, to know the news impact to the market price. The robot decisions to open, close, or
hold a position are reinforced by the news impact that are parsed from the website.
2. Forex Analysis
There are two ways to examinate changes in forex market [1], [5]. First is by using charting tools (also
known as technical analysis). Second is by using economic or forex related news and events (also known as
fundamental analysis). These exami-nation results can then be used by a trader to determine whether to
buy or sell a cur-rency pair at any one time.
2.1.2 Indicators
Indicators are some tools in forex that help traders to determine the best time to open a buy or a sell
order. A widely used indicator is Simple Moving Average (SMA). This indicator represents the average
closing price over a period of time. For example, 20 SMA represents the average of the last twenty closing
price. The blue curve in Fig. 2 shows an 20 SMA that cross the candlestick at a point. This crossover can give
a reversal trend signal to a trader. In this example, at the point of crossover, there is a reversal trend from
bullish (uptrend) to bearish (downtrend).
3. MetaTrader 4
MetaTrader 4 is a trading platform developed by MetaQuotes Software for online trading in the forex.
MT4 provides tools and resources that allow traders to analyze price, place and manage trades, and employ
automated trading techniques. This platform provide fiturs that help trader to analyse market situation and
to open trade position manually or automatically. Fig. 5 shows the environment of Meta Trader 4 platform.
The middle window in Fig. 5 shows the price movement chart which known as candlestick chart. The red
dotted line and the green chart show some indi-cators that are used in this chart. The right most window
shows a window to open, close, or modify trade orders (buy or sell) manually by a trader. The left most
window shows an IDE (Integrated Development Environment) to write codes to open, close, or modify
trade orders automatically by a robot.
1. Once the price has broken below the closest SMA by 10 pips or more.
2. Exit trade when the price breaks above the 50 SMA by 10 pips.
(a)
(b)
Fig. 6. Sampling of performance of fundamental robot (a) and technical robot (b) in EUR/USD, H1.
(a)
(b)
Fig. 7. Sampling of performance of fundamental robot (a) and technical robot (b) in USD/JPY, H1.
(a)
(b)
Fig. 8. Sampling of performance of fundamental robot (a) and technical robot (b) in GBP/USD, H1.
From these experiments, as can be seen from Fig. 6 – Fig. 8, the performance charts of technical robot
form rising linear curve, while the performance charts of fundamental robot form jagged saw curve. This
means that the performance of technical robot is more likely to be stable in profiting compared with
fundamental robot. This result match with the reference [3] which state that fundamental strategy is a long
term strategy. This means fundamental strategy needs longer period (some years) to profit. These
experiments use a short time period of testing (30 days).
According to a study by Martin D. D. Evans and Richard K. Lyons published in the Journal of International
Money and Finance (2004) [6], the market could still be absorbing or reacting to news releases hours, if not
days, after they are released. Based on this, the affect of the previous news can also affect the market when
there is a new release news. This can be the reason why the performance of fundamental robot is not as
smooth as the technical robot. Sequence of some news in a row affect market reactions and trends, while
this robot predict the market movement one by one for each news.
References
[1] Burgess, G. (2010). Trading and Investing in the Forex Markets Using Chart Techniques. John Wiley &
Sons.
[2] Grune, D., & Jacobs, C. J. H. (2008). Parsing Techniques. Springer.
[3] Kritzer, A. (2012). Forex for Beginners: A Comprehensive Guide to Profiting from the Global Currency
Markets. Apress.
[4] Young, A. R. (2010). Expert Advisor Programming: Creating Automated Trading Systems in MQL for
MetaTrader 4. Edgehill Publishing.
[5] Abednego, L., & Nugraheni, C. (2015). Development of Forex robot in MetaTrader 4. Proceedings of
International Congress on Engineering and Information.
[6] Evans, M. D. D., & Lyons, R. K. (2004). Do currency markets absorb news quickly? Journal of
International Money and Finance, 24(2), 197-217.
Luciana Abednego, S.Kom., M.T. was born in Bandung, March 10, 1981. She received
magister degree in informatics at Bandung Institute of Technology, Indonesia. Now, she is
a full time lecturer at Parahyangan Catholic University. Her publications includes as
below:
Sudoku as a Problem Domain in Studying Multiagent Systems. Proceedings of International
Conference on Software Engineering 2016.
On the Development of Hyper- heuristics based Framework for Scheduling Problems in
Textile Industry. Proceedings of International Conference on Software Engineering 2016.
Development of Forex Robot in MetaTrader 4. Proceedings of International Congress on
Engineering and Information 2015.
rer.nat. Cecilia Esti Nugraheni, S.T., M.T. was born in Solo, November 27, 1969. She
received the doctoral degree in informatics at Ludwig-Maxi-milians Universität
(University of Munich), Germany in 2014. She received the magister degree in informatics
at Bandung Institute of Technology, Indonesia. She is a full time lecturer at Parahyangan
Catholic University. Her publications includes:
Sudoku as a Problem Domain in Studying Multiagent Systems. Proceedings of International
Conference on Software Engineering 2016.
Irvan Rinaldi, S.T. was born in Bandung, April 16, 1994. He received the bachelor
degree in informatics at Parahyangan Catholic University, Indonesia. 2017.