Discussing the article: "Fast Integration of a Large Language Model with MetaTrader 5 (Part II): Fine-Tuning on Real Data, Backtesting, and Live Trading by the Model"
A rather odd paragraph:
Проблема в том, что при расчете RSI для свечи, закрывшейся 10 ноября в 10:00, формула RSI использует все доступные данные, включая бары за 10 ноября 11:00, 12:00 и далее. Это происходит потому, что индикаторы рассчитываются для всего датафрейма pandas сразу, используя векторизованные операции. В результате модель на момент 10 ноября 10:00 "знает", что произойдет в 11:00 и позже.
‘rolling’ is counted from the left up to the current index, rather than from the right.
Furthermore, Maxim Dmitrievsky has just written an article about ‘peeking into the future’. Your implementation does exactly that, because it sets markers based on the future.
actual_price_24h = future_row['close'] price_change = actual_price_24h - row['close'] price_change_pips = int(price_change / 0.0001) direction = "UP" if price_change > 0 else "DOWN"Although this is done not for fitting, but for fine-tuning.
Обучаем нейросети на осцилляторах без подглядывания в будущее
- 2025.11.24
- www.mql5.com
В статье описывается подход к разметке сделок с помощью осцилляторов для моделей машинного обучения. Это позволяет избавиться от look ahead bias. Показано, что такая разметка не приводит к переобучению моделей, а стратегии продолжают работать продолжительное время.
Coming up with a workable strategy for MO is quite a challenge and a real head-scratcher. There are so many pitfalls, from the layout right through to the gradient step – the model sometimes picks up on the finer details and sometimes it doesn’t. If you have a choice between MO and non-MO, it’s better to go for the latter :) And making models more complex is almost always more of a drawback than a benefit. As a brain teaser, though, it’s brilliant :)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Fast Integration of a Large Language Model with MetaTrader 5 (Part II): Fine-Tuning on Real Data, Backtesting, and Live Trading by the Model.
After deploying the language model described in the first part of the article, the system processed technical indicators — RSI, MACD, and volume analysis — correctly, and the model generated BUY or SELL trading signals. However, during a week of testing on a demo account, a significant problem became apparent.
Let's look at a specific example. The model registered a BUY signal for the EURUSD pair at an RSI value of 32, which technically corresponds to the oversold zone. After entering the position, the price continued to fall by another 200 pips, and it was not until three days later that it reversed and began to rise. The stop-loss was triggered, and the account was down 3%. The next day, a similar situation occurred on GBPUSD: with the RSI at 28, the model generated a BUY signal, but the price dropped another 300 pips, resulting in additional losses of 3%.
The problem lies not in the accuracy of the calculations for the indicators, but in the lack of practical experience. A base language model functions like a novice trader who has learned the theoretical rule “RSI below 30 is a buy signal” but lacks knowledge of how a specific currency pair reacts to oversold conditions under various market conditions. For example, the model does not take into account that, during the Asian session, EURUSD may continue to fall — despite low RSI readings — if there is a strong daily downtrend.
The base LLM understands the theoretical foundations of technical analysis but lacks empirical data on the behavior of specific instruments. Specifically, the model does not know that, when the RSI is at 25, EURUSD statistically falls by another 40 pips on average before reversing, GBPUSD may decline by 150 pips in a similar situation, and a MACD divergence on the H4 chart for USDCHF results in a successful reversal 70% of the time, whereas for USDCAD this figure is only 40%.
To solve this problem, we need a model trained on real historical statistics for specific currency pairs — one that understands their behavior not from textbooks, but from the analysis of thousands of real market situations.
Author: Yevgeniy Koshtenko