Expert Advisor ( EA ) Evaluation System Using Web-based ELECTRE Method in Foreign Exchange ( Forex ) Market

This research aims to optimize forex trading profit automatically using EA but its still keep considering accuracy and drawdown levels. The evaluation system will classify EA performance based on trading market sessions (Sydney, Tokyo, London and New York) to determine the right EA to be used in certain market sessions. This evaluation system is a web-based ELECTRE methods that interact in real-time with EA through web service and are able to present real-time charts performance dashboard using web socket protocol communications. Web applications are programmed using NodeJs. In the testing period, all EAs had been simulated 24 hours in all market sessions for three months, the best EA is valued by its profit, accuracy and drawdown criteria that calculated using web-based ELECTRE method. The ideas of this research are to compare the best EA on testing period with collaboration performances of each best classified EA by market sessions. This research uses three months historical data of EUR/USD as testing period and other 3 months as validation period. As a result, performance of collaboration four best EA classified by market sessions can increase profits percentage consistently in testing and validation periods and keep securing accuracy and drawdown levels.


Introduction
In determining the investment strategy in the foreign exchange market, decision makers have important roles and responsibilities to determine risks and profit targets.Decision makers are also required to be able to make three important decisions, namely: 1.Prices will move up or down; 2. Determine buying or selling decisions; 3. How long to hold the position that has been opened [1].Due to the importance of decision-making role in forex trading market, it is necessary to have a system to record and evaluate the history of transactions that have been done before in real-time so that it can help to provide performance reports from previous transactions.
Nowadays it is the era of computer and information technology that has been developing quite rapidly.For sure, this evolution affecting the way of trading transactions method in the forex market to continues to grow.Utilizing current technology allows Traders to perform real-time analysis and trading over the internet.Forex trading can also be done automatically based on EA (Expert Advisor) without human intervention, with automatically analytics and transactions using EA in forex transaction negotiation is to avoid human intervention that is usually influenced by emotions, anxiety, stress and other things.Therefore, trading by using EA becomes a solution to eliminate the elements of human intervention that are volatile.Even studies in 2010 concluded 45% of negotiation system in the forex market was conducted using EA [2].
Although the percentage of the use of EA in forex trading is very large, but analysis process and transaction history evaluation usually had been done only limited to transaction history analysis that found in Metatrader software, which its not optimal when used as EA performance evaluation data.With the integration of EA supported by calculations based on real-time web-based ELECTRE method will be more optimal in providing the best choice of several EA alternatives based on trading market sessions.
In addition to being able to perform analysis and transaction in the forex market automatically, the EA also has the ability to interact with the web service, so it can be integrated with algorithms that are applied to web based applications that provide supporting information for the EA itself.Forex trading research on the forex market has been done a lot before, including forex forecasting using ANN methods [3], multi-agency financial decision support system with Fuzzy logic [4] and Web-based decision support systems with ANN for forecasting and forex trading [5].However, this research focuses on evaluating the performance of ten open source EA that available on the official MQL4 (MetaQuotes Language 4) community website, although this evaluation system can still be used on all types of EAs either paid or created by traders who master the MQL4 programming language, by inserting a line of MQL4 code created in this evaluation system in order to interact with the web service and utilizing historical data of previous relevant currency movements to simulate the EAs.

Data acquisition
Historical currency movement data that used to simulate trading charts movement in MetaTrader software is downloaded from Histdata.com,while the EAs trading transaction data acquired in real-time on the web-based ELECTRE application through web service which is also integrated with web socket for Displaying EA performance graphs in real-time on the dashboard.These acquired transaction data saved in database, this database will be classified based on trading market sessions to get the best performing EA in each trading market session.Classifications process of market session is recognized by trading open position that done by real-time EA transaction.The flow of data acquisition process as shown in Figure 1.

ELECTRE method
The ELECTRE method is one of the multicriteria decision analysis methods which is an acronym of Elimination Et Choix Traduisant la Realité or in English means Elimination and Choice Expressing Reality, first introduced in 1965 by the SEMA consulting firm in Europe [6].The modeling with the ELECTRE method includes six stages, ie : 1. Normalization of matrix Normalization process will produce R matrix, that calculated by : 2. To weight the normalized matrix, multiply that R matrix values by the weight of each criterion using following equation: 3. Determining concordance and discordance index sets.
Concordance index calculated by : Meanwhile, following equation is to calculate discordance index :

Concordance and discordance matrix
Concordance matrix obtained by : Below equation is used to obtain discordance matrix:

Dominance concordance and discordance matrix
To determine dominance concordance matrix : Elements of F matrix specified by : To determine dominance discordance matrix : Elements of G matrix specified by : 6. Determining the aggregate dominance matrix Aggregation of the dominance matrix indicates the sequence of partial preferences of the available alternatives, to obtain this aggregate dominance matrix, following equation is used : From that calculation will produce the E matrix which gives sequence of options from each available alternative, if   = 1 then alternative   is a better alternative than   .So, the rows in the E matrix that having less   = 1 can be eliminated, as well as other rows calculation can be eliminated until remaining first row as selected best EA alternative.

Results and discussion
Required data acquisition process in this research is EAs transaction data from ten simulated EA and percentage of profit, accuracy and drawdown from each EA performance.

a. Transactions data acquisition process
Data acquisition process in web-based ELECTRE application is done in real-time when trading simulation is executed on MetaTrader software, EA will send trading transaction data to web service such as alt_id, ticket_id, open_time, close_time, type, lots, symbol, open_price, close_price and profit fields.
b.Meanwhile, the value data that consisting of profit, accuracy and drawdown were obtained by calculating the percentage of that three criterias based on transaction history data, while capital=5000, %Profit = ((profit + loss) / capital) x 100, %Accuracy = (∑ profit positions / ∑ all positions) x 100, Drawdown = (maximum floating / capital) x 100.This calculation will be obtained value as shown in Table 1 and Table 2.The alternative with   = 1 will be eliminated while alternative with the most of   = 1 will be selected as the best alternative as shown in Figure 2. k.These calculation steps are also used to get the best EAs in the best EA selection process based on market sessions as shown in Figure 3. l.In order to get optimal results, if there are more than one EAs with same performances appeared in the same market session, only one EAs will be selected as best EA on that market session based on highest criteria weight priority.

Results Evaluation and validation
EAs performance evaluation and validation of ELECTRE method calculation had been tested using different test time data, october to december (2016) as testing period and january to march (2017) as validation period with different transaction data amounts, so that the results obtained as in Figure 4 and 5.

Conclusion
The decision-making system with web-based ELECTRE method to determine the best collaboration EAs to be used based on its best market session performance, EAs performance are calculated by its profit, accuracy and drawdown criterias and the use of combination four EAs were best on its market session can increase profit consistently while maintaining accuracy and drawdown levels, this can be proven in the testing and validation processes with the profit increase level of 0.63 (9.20%) in the testing period and 9.03 (219.71%) in the validation period, and keep securing accuracy and drawdown levels when compared to other EAs.

Table 1 .
Value of each criteria without market classification

Table 2 .
Value of each criteria by market sessions