1. Introduction
Over the last decade, cryptocurrencies have emerged as increasingly prominent assets in global financial markets, primarily due to their rapid capitalization and growing popularity [
1]. As of today, thousands of cryptocurrencies are actively traded, with Bitcoin standing out as the first and most capitalized digital asset since its inception in 2009 [
2,
3]. However, the extreme volatility and limited predictability of cryptocurrency prices, especially Bitcoin, have posed significant challenges for analysts and researchers alike [
4,
5,
6]. This uncertainty has prompted the development of advanced tools and strategies aimed at reducing risk and improving trading outcomes. While fundamental analysis has traditionally been used to evaluate the intrinsic value of financial assets, its limitations in highly volatile markets have led experts to increasingly rely on technical analysis [
7,
8]. Within this context, the use of moving averages (MAs) has gained popularity as a basic yet effective strategy for trend identification. To improve its performance, optimization techniques have been integrated into technical indicators, offering adaptive mechanisms for better decision-making.
In this work, we propose a hybrid automatic trading system that combines a dual Simple Moving Average (2-SMA) strategy with the Learning-Based Linear Balancer (
) optimization framework [
9]. The 2-SMA component serves as the signal generator, while
dynamically adjusts its parameters to maximize profitability over time. This optimization framework leverages population-based metaheuristics and learning-based feedback to balance intensification and diversification during the search process. The use of
is further motivated by recent findings in the literature, which highlight the advantages of hybrid optimization schemes over traditional single-metaheuristic approaches [
10,
11]. By integrating learning-based components,
enables adaptive control of the search dynamics based on real-time feedback from the optimization process. This flexibility improves the algorithm’s ability to respond to changes in the search space and enhances overall performance. Such hybrid strategies have shown superior results when tackling complex, noisy, and dynamic optimization problems, conditions frequently encountered in financial trading environments. Beyond its empirical performance, the proposed system introduces several methodological innovations. First, it models the 2-SMA strategy as a finite-state machine with six tunable parameters, including stop–loss and stop–win thresholds for both long and short positions—extending the classical crossover approach. Second, the objective function integrates transaction costs and realistic position management logic, simulating the compound effect of sequential trades over historical market periods. Finally, the adoption of
for adaptive parameter tuning represents a novel application of learning-based hybrid optimization in the context of algorithmic trading, enabling a more robust and data-driven configuration process.
The system proposed in this work is tested on historical BTCUSDT data (a Bitcoin-based perpetual futures instrument) obtained from the Binance platform, covering the period from August 2020 to January 2022. The simulations replicate real-world trading conditions, including transaction fees and position management rules. The results demonstrate consistent positive returns, reinforcing the practicality of combining technical analysis with adaptive optimization in volatile markets such as cryptocurrencies.
The central challenge addressed in this work lies in the rigidity of traditional technical trading strategies, such as 2-SMA, which rely on fixed parameters and lack adaptation to rapidly changing market dynamics [
12]. In highly volatile markets like cryptocurrencies, static configurations often lead to inconsistent performance, overfitting to past trends, or exposure to avoidable risks [
13]. Although 2-SMA strategies are widely used for their simplicity and interpretability [
14], their effectiveness depends heavily on parameter tuning, which is rarely optimized in practice. This highlights the need for intelligent optimization frameworks capable of adapting to different market conditions [
15,
16]. Our work aims to fill this gap by integrating a learning-based optimization mechanism that adaptively tunes 2-SMA parameters to maximize performance while maintaining generalizability.
The main contributions of this work are summarized as follows:
We design and implement a hybrid trading system combining the 2-SMA strategy with the optimizer.
The system is validated on real historical data under realistic trading constraints (Binance Futures platform).
Performance is evaluated across multiple temporal windows, showing consistency in returns and robustness to volatility.
A comparison with baseline strategies and statistical validation is provided to strengthen the empirical assessment.
While our study focuses on BTCUSDT, a liquid, highly volatile cryptocurrency pair, many of the behavioral patterns captured by technical indicators such as moving average crossovers are shared with other major cryptocurrencies (e.g., ETH, LTC). In particular, their decentralized structure, 24/7 trading availability, and heightened sensitivity to investor sentiment result in frequent trend reversals and short-lived patterns, which are precisely the types of dynamics that crossover-based systems aim to capture [
17]. In contrast, fiat currency pairs (Forex) tend to exhibit lower volatility and stronger influence from macroeconomic events and centralized monetary policies. Consequently, similar strategies may require longer time frames or additional filters to perform effectively in traditional markets. Regarding regional differences, centralized exchanges such as Binance operate globally, creating a relatively uniform trading environment. However, time zone effects (e.g., higher volatility during overlapping U.S. and European sessions) can impact short-term patterns. Since our system is data-driven and optimized over multiple historical periods, it inherently adapts to such fluctuations without being explicitly tied to any regional market structure. Finally, we note that BTC’s high liquidity, dominance in the crypto market, and tendency to lead broader market trends make it an appropriate candidate for initial testing [
18]. However, future work could extend our methodology to multi-asset or cross-market scenarios to further explore its generalization capabilities.
The remainder of this paper is organized as follows:
Section 2 reviews the main research directions in automated trading systems and optimization methods.
Section 3 introduces the core concepts underlying metaheuristics, the
optimization framework, and technical trading indicators.
Section 4 presents the methodology used in this work.
Section 5 formally defines the trading problem, including the decision variables, constraints, and objective function.
Section 6 outlines the proposed simulation and optimization workflow.
Section 7 details the experimental setup, reports performance outcomes, and compares the proposed approach against classical trading benchmarks. Finally,
Section 8 summarizes the main contributions and discusses potential avenues for future research.
2. Related Works
In recent years, the interest in automated trading systems has grown significantly, particularly in the context of cryptocurrency markets. This surge is driven by the increasing complexity of trading environments and the potential for high returns. Research efforts in this field have primarily focused on three main areas: portfolio optimization [
19,
20,
21,
22], the application of deep learning models for price forecasting [
23,
24,
25,
26], and, though to a lesser extent, the use of metaheuristics to optimize rule-based strategies derived from technical indicators [
27,
28,
29,
30,
31].
The present work is aligned with the third line of research. It proposes a hybrid architecture that integrates a classical technical analysis method (dual Simple Moving Average, or 2-SMA) with a metaheuristic optimization framework (
LB2). This approach aims to enhance the profitability of traditional indicators by adaptively tuning their parameters using machine learning-assisted metaheuristics. Although the integration of technical analysis and metaheuristics has received limited attention, a growing number of studies have explored this intersection. For example, in [
31], Ant Colony Optimization (ACO) was applied to dynamically adjust decision thresholds in a Pairs Trading strategy on the Forex market. Similarly, ref. [
29] presented a trading model based on three moving averages optimized by Particle Swarm Optimization (PSO), where trading signals were generated based on predicted price movements. Other studies have compared the performance of different optimization algorithms in financial contexts. In [
27], PSO and Genetic Algorithms (GAs) were evaluated for designing market timing strategies using Moving Average Convergence Divergence (MACD), Relative Strength Index (RSI), and CHAIKIN indicators. The results showed that optimized strategies outperformed static configurations across varying market conditions. Furthermore, ref. [
28] implemented and analyzed the Fireworks Algorithm (FA) and PSO for optimizing Bollinger Band-based strategies on the S&P 500 index, focusing on the balance between exploration and exploitation. These works collectively highlight the potential of metaheuristic optimization in enhancing trading strategies. However, only a few studies have applied such techniques specifically to the cryptocurrency market, where price volatility and rapid regime changes present additional challenges. Moreover, the majority of previous approaches rely on static or purist optimization schemes. In contrast, our proposed method leverages a hybrid learning-based optimizer,
LB2, which dynamically adjusts the exploration–exploitation trade-off in real time.
In summary, this work contributes to the growing body of research on intelligent trading systems by (i) applying metaheuristic optimization to a classical indicator under real-world trading conditions and (ii) demonstrating the advantages of using hybrid, adaptive optimization strategies in volatile financial markets such as cryptocurrencies.
4. Methodology
The core objective of this study is to implement an automatic trading strategy based on a dual Simple Moving Average (2-SMA) system, whose parameters are optimized using the Learning-Based Linear Balancer (). The strategy is applied to the BTCUSDT trading pair using historical data extracted from the Binance Futures platform.
The foundation of the system lies in computing two Simple Moving Averages (SMAs) with different time windows over the closing prices of the financial instrument. The longer-period SMA reflects a broader market trend and reacts more slowly to recent changes, while the shorter-period SMA captures more recent price movements with greater sensitivity (
Figure 1).
Trading signals are generated based on crossover events. A long position (buy signal) is initiated when the short-term SMA crosses above the long-term SMA, suggesting a potential upward trend. Conversely, a short position (sell signal) is triggered when the short-term SMA crosses below the long-term SMA, indicating a downward trend. To manage open positions and mitigate risks, the system incorporates two additional mechanisms: trailing stop–loss bands and fixed stop–win thresholds. These bands are applied differently for long and short positions:
Trailing Stop–Loss: A dynamic threshold that adjusts with market movement and is designed to limit losses. If the market moves against the currently open position beyond a specified tolerance, the system automatically closes the position.
Stop–Win: A fixed threshold (expressed as a percentage of the entry price) that locks in profits if the price reaches a predefined favorable point. This helps prevent reversals from eroding potential gains.
Figure 2 illustrates a case where a long position is opened after a crossover signal, but the price does not increase as expected. The stop–loss mechanism triggers an exit before greater losses occur. Similarly, if the price had increased beyond a certain percentage, the stop–win mechanism would have secured profits.
The complete strategy, therefore, combines trend detection (via 2-SMA crossovers) with dynamic position management to reduce risk and capture gains. The parameters of the moving averages and stop bands are then optimized using the framework, as detailed in the following subsection.
8. Conclusions
In this work, we proposed an automated trading system based on the dual Simple Moving Average (2-SMA) strategy, optimized using the Learning-Based Linear Balancer () metaheuristic framework. The strategy was evaluated through simulations using historical data of the BTCUSDT trading pair on the Binance Futures platform. The simulation environment replicated real-world trading conditions, including transaction fees, enhancing the practical relevance of the results. The optimizer was applied across 34 different training/test splits, achieving an average return on investment (ROI) of 7.9% on unseen test periods. In the best configuration, the system achieved up to 17.2% ROI over a 2-month period. These results confirm the ability of the proposed system to consistently generate profits under volatile market conditions, surpassing both Buy and Hold and traditional fixed-parameter strategies.
Despite these promising results, some variability was observed across different periods, with occasional drawdowns in performance. To address this, future work could explore the construction of diversified portfolios across multiple futures instruments, reducing the risk of asset-specific downturns. Additionally, incorporating alternative technical indicators could enhance robustness and capture a wider range of market dynamics. Another avenue for extension is the reformulation of the optimization problem in a multi-objective framework, balancing return maximization with risk control or variance minimization. This would enable a more comprehensive assessment of performance, especially in risk-sensitive applications. Furthermore, an interesting direction for future research involves extending our framework to support the modeling of derivative instruments with early-exercise features, such as American-style futures. While our study is centered on European-styled perpetual futures typical of cryptocurrency markets, incorporating optimal stopping behavior and free boundary formulations could enable meaningful comparisons with classical pricing approaches. In particular, the recent work by Zaevski provides a comprehensive analytical treatment of American futures contracts that could serve as a theoretical benchmark for such extensions [
47]. Bridging adaptive trading strategies with formal pricing models represents a promising avenue for unifying practice-oriented and theory-driven approaches in algorithmic trading. Finally, to evaluate the universality and robustness of the proposed approach, future work will involve applying the
LB2-optimized 2-SMA strategy to traditional financial markets such as the S&P 500 and the Shanghai Composite Index. These markets exhibit markedly different characteristics compared to cryptocurrencies, including fixed trading hours, lower volatility, and tighter regulatory oversight. By testing the method across diverse asset classes and geographic regions, we aim to assess its adaptability and generalization capacity in broader financial contexts.
Beyond its technical and methodological contributions, this study offers practical implications for risk management and investment strategy design. The use of trailing stop–loss and stop–win mechanisms allows for dynamic position control, helping to limit downside exposure while capturing profitable opportunities. Additionally, the adaptive nature of the optimizer supports real-time adjustment of strategy parameters, enabling more responsive decision-making in high-volatility environments. These features make the system suitable for integration into automated investment pipelines or as a decision-support tool for traders seeking consistent, risk-aware performance under uncertainty. Overall, this study demonstrates the effectiveness of combining classical technical analysis with adaptive optimization. The results open promising directions for building more intelligent, robust, and adaptive trading systems in high-volatility markets like cryptocurrencies.