ALGORITHMIC TRADING DENGAN STRATEGI MENGIKUTI TREN MENGGUNAKAN EXPONENTIAL MOVING AVERAGE DAN STOCHASTIC OSCILLATOR

Authors

  • Ahmad Juniar Universitas Gunadarma , Politeknik STMI Jakarta
  • Asep Juarna Universitas Gunadarma

DOI:

https://doi.org/10.33480/inti.v21i1.8654

Keywords:

Algorithmic Trading, Cocoa Commodity Trading, Exponential Moving Average, Stochastic Oscillator, Technical Analysis

Abstract

The restrictions on social interactions during the COVID-19 pandemic encouraged individuals to seek alternative sources of income. Advances in information technology have enabled investors to participate in financial markets through online platforms. According to data from the Indonesian Central Securities Depository (KSEI), the number of capital market investors in Indonesia increased between 2000 and 2022. Algorithmic trading refers to a systematic trading approach in which computer algorithms are utilized to generate trading signals and execute market orders automatically according to predefined trading rules. This approach employs technical analysis to forecast asset or commodity prices using historical price and trading volume data. This study develops an algorithmic trading system for cocoa futures, a commodity traded on the Intercontinental Exchange (ICE) New York and ICE London. The proposed model incorporates two technical indicators, namely the Exponential Moving Average (EMA) and the Stochastic Oscillator. The trading system was implemented using the MQL5 programming language on the MetaTrader 5 platform. Historical cocoa price data covering the period from 2024 to 2025 were obtained from Dukascopy Bank SA, a Swiss banking institution. The experimental results show that the proposed system achieved a win rate of 42.59% and a profit factor of 1.63, while maintaining a maximum drawdown of 8.52%, indicating a relatively low level of risk. Furthermore, the equity curve exhibited consistent growth and the histogram analysis demonstrated stable performance across most trading days. Based on established performance metrics, the proposed system is considered viable and sufficiently robust, as it successfully withstands multiple market cycles.

Downloads

Download data is not yet available.

References

Abudy, M. M., Kaplanski, G., & Mugerman, Y. (2024). Market Timing with Moving Average Distance: International Evidence. Journal of International Financial Markets, Institutions and Money, 97, 102065. https://doi.org/10.1016/j.intfin.2024.102065

Aycel, Ü., & Santur, Y. (2022). A New moving average approach to predict the direction of stock movements in algorithmic trading. Journal of New Results in Science, 11(1), 13–25. https://doi.org/10.54187/jnrs.979836

Day, M.-Y., Cheng, Y., Huang, P., & Ni, Y. (2023). The Profitability of Trading US Stocks in Quarter 4: Evidence from Trading Signals Emitted by SOI and RSI. Applied Economics Letters, 30(9), 1173–1178. https://doi.org/10.1080/13504851.2022.2041165

Ding, W., Mazouz, K., ap Gwilym, O., & Wang, Q. (2023). Technical Analysis as a Sentiment Barometer and the Cross-Section of Stock Returns. Quantitative Finance, 23(11), 1617–1636. https://doi.org/10.1080/14697688.2023.2244991

Dukascopy Bank SA. (2025). About Dukascopy Bank SA. Dukascopy Bank SA. https://www.dukascopy.com/swiss/english/about/company/

Futures Industry Association. (2023). Viewpoint -- The ``Rise in Retail’’ Is Here to Stay in Derivatives Markets. https://www.fia.org/marketvoice/articles/viewpoint-rise-retail-here-stay-derivatives-markets

George, J. P., Nair, A. M., & Yathish, S. (2022). Analysis of Market Behavior Using Popular Digital Design Technical Indicators and Neural Network (pp. 445–458). Springer, Singapore. https://doi.org/10.1007/978-981-16-2126-0_37

Ghanem, S., Harasheh, M., Sbaih, Q., & Ajmal, T. K. (2024). The Predictability of Technical Analysis in Foreign Exchange Market Using Forward Return: Evidence from Developed and Emerging Currencies. Cogent Business & Management, 11(1), 1–19. https://doi.org/10.1080/23311975.2024.2428781

Ice.com. (2025). Cocoa Futures. https://www.ice.com/products/7/Cocoa-Futures

Islam, T., & Kapinchev, K. (2024). Evaluation of the Effectiveness of Technical Indicators. 1–6. https://doi.org/10.1109/icspcs63175.2024.10815753

Kaufman, P. J. (2019). Trading Systems and Methods (sixth edit). John Wiley & Sons.

KSEI. (2022). Didominasi Milenial dan Gen Z, Jumlah Investor Saham Tembus 4 Juta. Kustodian Sentral Efek Indonesia. https://www.ksei.co.id/files/uploads/press_releases/press_file/id-id/208_berita_pers_didominasi_milenial_dan_gen_z_jumlah_investor_saham_tembus_4_juta_20220725182203.pdf

Loh, L. K. Y., Kueh, H. K., Parikh, N. J., Chan, H., Ho, N. J. H., & Chua, M. C. H. (2022). An Ensembling Architecture Incorporating Machine Learning Models and Genetic Algorithm Optimization for Forex Trading. FinTech, 1(2), 100–124. https://doi.org/10.3390/fintech1020008

MetaQuotes Ltd. (2025a). MetaTrader 5 Multi-Asset Trading Platform. MetaQuotes Ltd. https://www.metaquotes.com/en/metatrader5

MetaQuotes Ltd. (2025b). MQL5 Documentation. MetaQuotes Ltd. https://www.mql5.com/en/docs

Ojha, A., & Saxena, V. (2023). Understanding Stock Market Trends Using Simple Moving Average (SMA) and Exponential Moving Average (EMA) Indicators. 6, 1931–1935. https://doi.org/10.1109/ic3i59117.2023.10398001

Omole, O., & Enke, D. (2024). Deep learning for Bitcoin price direction prediction: models and trading strategies empirically compared. Financial Innovation, 10(1), 117. https://doi.org/10.1186/s40854-024-00643-1

Paik, C., Choi, J., & Vaquero, I. U. (2024). Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator, Williams%R, and Trading Volume for the S&P 500. Journal of Risk and Financial Management, 17(11). https://doi.org/10.3390/jrfm17110501

Rink, K. (2023). The Predictive Ability of Technical Trading Rules: An Empirical Analysis of Developed and Emerging Equity Markets. Financial Markets and Portfolio Management, 37(4), 403–456. https://doi.org/10.1007/s11408-023-00433-2

Shavandi, A., & Khedmati, M. (2022). A multi-agent deep reinforcement learning framework for algorithmic trading in financial markets. Expert Systems with Applications, 208, 118124. https://doi.org/10.1016/j.eswa.2022.118124

Skott-Myhre, H. (2022). COVID-19 forecasts via stock market indicators. Dental Science Reports, 12(1). https://doi.org/10.1038/s41598-022-15897-x

Strategy Quant. (2025). QuantDataManager Software. Strategy Quant. https://strategyquant.com/quantdatamanager/

Takada, T., & Kitajima, T. (2022). Trend-following with better adaptation to large downside risks. PLOS ONE, 17(10), e0276322. https://doi.org/10.1371/journal.pone.0276322

Tanwar, S., & Raboaca, M. S. (2022). Stochastic Neural Networks-Based Algorithmic Trading for the Cryptocurrency Market. Mathematics, 10(9), 1456. https://doi.org/10.3390/math10091456

Tomasini, E., & Jaekle, U. (2009). Trading Systems: A New Approach to System Development and Portfolio Optimisation. Harriman House Ltd.

Zakamulin, V., & Giner, J. (2022). Time series momentum in the US stock market: Empirical evidence and theoretical analysis. International Review of Financial Analysis, 82, 102173. https://doi.org/10.1016/j.irfa.2022.102173

Zulkifli, Z. S., Zamri, N., Mohammad, H., & Al-Saadi, R. A. A. R. (2024). Design Algorithmic Trading Strategies with Expert Advisor Using Linear Weighted Moving Average (LWMA) and Stochastic Oscillator Technical Indicators. Journal of Computers and Digital Business, 3(2), 43–49. https://doi.org/10.56427/jcbd.v3i2.404

Downloads

Published

2026-08-31

How to Cite

ALGORITHMIC TRADING DENGAN STRATEGI MENGIKUTI TREN MENGGUNAKAN EXPONENTIAL MOVING AVERAGE DAN STOCHASTIC OSCILLATOR. (2026). INTI Nusa Mandiri, 21(1), 160-171. https://doi.org/10.33480/inti.v21i1.8654