About the issue
Publications
Partners
June 2025 (published: 05.06.2025)
Number 2(61)
Home
>
Issue
>
Design and implementation of an automated Forex trading system based
on dynamic strategy and custom technical indicators
Huynh Cong Tu
Keywords: Fintech, Forex, Algorithmic Trading, Expert Advisor, MetaTrader, Technical Indicators, Martingale, Risk Management, MQL4.
References:
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License
Design and implementation of an automated Forex trading system based
on dynamic strategy and custom technical indicators
Article in
English
Reference for citation: Huynh Cong Tu Design and implementation of an automated Forex trading system based on dynamic strategy and custom technical indicators. Scientific journal NRU ITMO. Series «Economics and Environmental Management». 2025. № 2. Р. 3-11. DOI: 10.17586/2310-1172-2025-18-2-3-11
Abstract. In the rapidly evolving Fintech domain, automated trading systems play an increasing role in optimizing investments and risk management in financial markets, especially in foreign exchange (Forex). This paper presents the design, implementation, and evaluation of a novel Expert Advisor (EA) named PicoDyna on the MetaTrader 4 platform using MQL4. PicoDyna is built upon a trend-following strategy combined with adaptive components: it leverages multiple technical indicators (RSI, CCI, EMA, and Coral) and a dynamic martingale-like position sizing mechanism (LotExponent) with a volatility-based order spacing (dynamic PipStep). Advanced risk management features, including trailing stops, time-based exits, and equity drawdown protection, are integrated to enhance the system’s robustness. We evaluate PicoDyna with one-year historical backtests on two distinct instruments (EUR/USD and XAU/USD) on H1 timeframe. The results demonstrate stable performance, with a high win rate and profit factor >1.8 on both instruments, and effective drawdown control (max <17%). The EA exhibits adaptability to different market conditions, yielding consistent gains in trending markets while limiting losses during sideways or volatile periods. This study contributes a modular EA framework that can adapt to market volatility and provides a basis for further research in applying AI and machine learning to automated trading.
Read the full article
Reference for citation: Huynh Cong Tu Design and implementation of an automated Forex trading system based on dynamic strategy and custom technical indicators. Scientific journal NRU ITMO. Series «Economics and Environmental Management». 2025. № 2. Р. 3-11. DOI: 10.17586/2310-1172-2025-18-2-3-11
Abstract. In the rapidly evolving Fintech domain, automated trading systems play an increasing role in optimizing investments and risk management in financial markets, especially in foreign exchange (Forex). This paper presents the design, implementation, and evaluation of a novel Expert Advisor (EA) named PicoDyna on the MetaTrader 4 platform using MQL4. PicoDyna is built upon a trend-following strategy combined with adaptive components: it leverages multiple technical indicators (RSI, CCI, EMA, and Coral) and a dynamic martingale-like position sizing mechanism (LotExponent) with a volatility-based order spacing (dynamic PipStep). Advanced risk management features, including trailing stops, time-based exits, and equity drawdown protection, are integrated to enhance the system’s robustness. We evaluate PicoDyna with one-year historical backtests on two distinct instruments (EUR/USD and XAU/USD) on H1 timeframe. The results demonstrate stable performance, with a high win rate and profit factor >1.8 on both instruments, and effective drawdown control (max <17%). The EA exhibits adaptability to different market conditions, yielding consistent gains in trending markets while limiting losses during sideways or volatile periods. This study contributes a modular EA framework that can adapt to market volatility and provides a basis for further research in applying AI and machine learning to automated trading.
Read the full article

Keywords: Fintech, Forex, Algorithmic Trading, Expert Advisor, MetaTrader, Technical Indicators, Martingale, Risk Management, MQL4.
References:
- Salkar T., Shinde A., Tamhankar N., Bhagat N. Algorithmic Trading using Technical Indicators // 2021 International Conference on Communication information and Computing Technology (ICCICT). 2021. P. 1–6. doi: 10.1109/ICCICT50803.2021.9510135.
- Mirete-Ferrer P.M., Garcia-Garcia A., Baixauli-Soler J.S., Prats M.A. A Review on Machine Learning for Asset Management // Risks. 2022. Vol. 10, No. 4. doi: 10.3390/risks10040084.
- Patil B.V., Shaikh T., Hussain K., Dahiya S. Integrating Ensemble Machine Learning with Technical Indicators for Superior FX Volatility Prediction // 2024 International Conference on Intelligent Systems and Advanced Applications (ICISAA). 2024. P. 1–6. doi: 10.1109/ICISAA62385.2024.10828793.
- Aloysius J.A. Rational escalation of costs by playing a sequence of unfavorable gambles: the martingale // Journal of Economic Behavior and Organization. 2003. Vol. 51. P. 111–129.
- Lehoczky J., Schervish M. Overview and History of Statistics for Equity Markets // Annual Review of Statistics and Its Application. 2018. Vol. 5. P. 265–288. doi: 10.1146/annurev-statistics-031017-100518.
- Musiela M., Rutkowski M. Martingale Methods in Financial Modelling. Berlin: Springer, 2005. 513 p.
- Guo X., Lai T.L., Shek H., Wong S.P.-S. Quantitative Trading: Algorithms, Analytics, Data, Models, Optimization. 1st ed. Boca Raton: Chapman and Hall/CRC, 2017. 442 p. doi: 10.1201/9781315371580.
- Elder A. Come Into My Trading Room: A Complete Guide to Trading. Hoboken: Wiley, 2002. 320 p.
- Murphy J.J. Technical Analysis of the Financial Markets. New York: New York Institute of Finance, 1999. 576 p.
- Chourmouziadis K., Chourmouziadou D.K., Chatzoglou P.D. Embedding Four Medium-Term Technical Indicators to an Intelligent Stock Trading Fuzzy System for Predicting: A Portfolio Management Approach // Computational Economics. 2021. Vol. 57, No. 4. P. 1183–1216. doi: 10.1007/s10614-020-10016-2.
- Kharisma F.R., Khoirudin, Diartono D.A. Automated Forex Trading Using Exponential Moving Average Method // 2023 International Conference on Technology, Engineering, and Computing Applications (ICTECA). 2023. P. 1–5. doi: 10.1109/ICTECA60133.2023.10490520.
- Bin Ismail M.A.H., Bin Husin Z., Keong T.W., Bin Yasruddin M.L. Prediction of Expert Advisor Trading System Using An Artificial Intelligence System // 2022 IEEE IAS Global Conference on Emerging Technologies (GlobConET). 2022. P. 233–237. doi: 10.1109/GlobConET53749.2022.9872367.
- Hernes M., Korczak J., Krol D., Pondel M., Becker J. Multi-agent platform to support trading decisions in the FOREX market // Applied Intelligence. 2024. Vol. 54, No. 22. P. 11690–11708. doi: 10.1007/s10489-024-05770-x.
- Ielpo F., Merhy C., Simon G. Backtesting and Statistical Significance of Performance // In: Engineering Investment Process. Amsterdam: Elsevier. 2017. P. 259–296. doi: 10.1016/B978-1-78548-162-8.50004-9.
- Krauss C., Do X. A., Huck N. Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500 // European Journal of Operational Research. 2017. Vol. 259, No. 2. P. 689–702. doi: 10.1016/j.ejor.2016.10.031.
- Chong E., Han C., Park F.C. Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies // Expert Systems with Applications. 2017. Vol. 83. P. 187–205. doi: 10.1016/j.eswa.2017.04.030.
DOI 10.17586/2310-1172-2025-18-2-3-11
