INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue I, January 2025
www.ijltemas.in Page 17
factor, a measure of risk-adjusted profitability, stood at 1.47, suggesting that the gains from profitable trades outweighed the
losses from unprofitable ones. The average trade value was recorded at $8.64, demonstrating consistent, albeit small, profit per
trade, indicative of a more conservative risk approach and smaller, frequent trades rather than large speculative positions.
When it comes to profitability, this strategy consistently delivers outstanding results. For example, the Net Profit of 959.38 USD,
representing a 95.94% return on investment, is a clear indication of how effectively the AI integrates with the market trends.
More impressively, the system is capable of achieving 1,096.62 USD in profits, or 109.66%, in certain market conditions. Even in
the most challenging scenarios, where the market moves against the position, the strategy only experiences a modest loss of -
137.24 USD (-13.72%).
The Gross Profit of 3,005.71 USD (300.57%) stands as a testament to the strategy’s ability to generate significant returns from
favorable market trends. This is in stark contrast to the Gross Loss of 2,046.33 USD (204.63%), showcasing that the strategy’s
risk management—fueled by the AI’s real-time decision-making—ensures that losses are contained when the market shifts
unfavorably. The strategy’s risk-reward balance is further highlighted by its Max Run-up of 1,239.51 USD (56.52%), which
demonstrates the system's ability to capitalize on sustained favorable movements, as well as its ability to mitigate risks.
Key metrics like the Sharpe Ratio (0.558) and Sortino Ratio (2.664) underscore the risk-adjusted returns. The Sortino Ratio, in
particular, highlights the strategy’s strength in managing downside risk and delivering higher returns for every unit of risk taken.
The Profit Factor of 1.469 indicates that the strategy is generating 1.47 USD for every 1 USD lost, further illustrating the AI’s
ability to manage trades effectively, ensuring that profits outpace losses.
In terms of trade execution, the Number of Winning Trades (41) and Number of Losing Trades (70) reveal a slightly higher
number of losing trades compared to winners. However, the Percent Profitable (36.94%) is complemented by the Average
Winning Trade of 73.31 USD, which is significantly higher than the Average Losing Trade (29.23 USD). This means that while
the strategy might have a slightly lower win rate, it makes up for it by generating larger gains when it wins, thanks to its precise
AI-driven predictions. The Ratio of Average Win to Average Loss is particularly striking, at 2.508, confirming that the strategy is
designed to maximize profits from its winners while keeping losses under control.
Largest Trades and Position Sizing
The Largest Winning Trade of 589.45 USD (38.08%) shows that the strategy is capable of identifying highly profitable
opportunities when the market trends in its favor. This is a significant figure, especially when compared to the Largest Losing
Trade, which is relatively contained at 82.52 USD (6.23%), reinforcing the strategy’s ability to limit exposure to large losses.
Other notable metrics like the Avg # Bars in Trades (83) and Avg # Bars in Winning Trades (156) further emphasize the
strategy’s focus on capturing medium-to-long-term trends, as the AI focuses on more substantial market movements rather than
short-lived fluctuations. The Avg # Bars in Losing Trades (40) suggests that even losing trades tend to last a shorter time,
reflecting the AI’s ability to exit losing positions quickly to minimize downside risk.
Additionally, the Total Closed Trades (111), Total Open Trades (1), and the Open P&L (106.77 USD) indicate that the strategy is
highly efficient in terms of trade execution and is constantly fine-tuned by the AI to adapt to market conditions.
The trading decisions, both long and short, were based on a sophisticated combination of the SuperTrend and AI-driven KNN
classification. The SuperTrend indicator, which is a trend-following tool based on volatility and average true range (ATR),
identified market conditions that dictated whether the bot should enter a long or short position. The KNN algorithm, implemented
within the bot's code, was used to refine these decisions. By considering multiple data points and determining the distance
between the current market condition and historical data, the KNN model assigned weights to the nearest neighbors, which helped
predict the direction of the market. The bot’s decision-making process relied on a combination of these two factors: the trend
established by the SuperTrend and the AI's classification of that trend’s strength and potential sustainability.
The bot’s ability to execute both long and short trades was pivotal in optimizing its performance. When a bullish trend was
detected, indicated by a crossing of the price above the SuperTrend and confirmed by the KNN's classification as a "bullish"
signal, the bot entered a long position. Conversely, when a bearish trend was identified, with price below the SuperTrend and the
KNN predicting a "bearish" market, the bot initiated a short position. These decisions were reinforced by additional AI-driven
signals that indicated the start or continuation of these trends, further enhancing the bot's responsiveness to market shifts.
The results show that integrating AI with the SuperTrend strategy significantly improved the bot’s trading decisions compared to
a purely rule-based system. The use of KNN allowed the bot to adapt to changing market conditions, reducing the risk of false
signals and improving the accuracy of trend prediction. Despite the relatively low win rate of 37%, the positive profit factor of
1.47 and the net profit of 95.94% suggest that the bot was effective in managing risk and capitalizing on profitable trades, thereby
ensuring overall growth in its portfolio.
The decision-making process of the bot was driven by a combination of the SuperTrend indicator and the KNN algorithm, which
worked in tandem to identify market conditions and predict price movements. The SuperTrend is a trend-following indicator that
calculates upper and lower bands based on the Average True Range (ATR), providing insights into the volatility and direction of
the market. The SuperTrend was calculated as follows: