IntervalAI
- エキスパート
- Yevhen Chystiukhin
- バージョン: 1.1
- アップデート済み: 5 11月 2024
- アクティベーション: 10
This multi-currency expert advisor uses 28 currency pairs. For predictions, the advisor uses recurrent neural networks of the LSTM type, models trained in the Python language environment, and imported into the advisor using a new function in MQL5 for loading ONNX models.
Live signal: https://www.mql5.com/en/signals/2258349
Settings file for testing the advisor: IntervalAIPairs19Proc5.set
The algorithm of the advisor works simultaneously with two timeframes H15 and H1. Separate neural network models have been trained for each of the 28 pairs for both timeframes. The idea is that the advisor places orders only when the signals from the neural network models for the H15 timeframe coincide with the neural network model signals for the H1 timeframe. But this is the default main mode, you can also trade separately on the H15 or H1 timeframe and simultaneously without matching signals, as in the main mode.
Here’s how to configure these 4 modes in the advisor in the Use Time Intervals settings group:
1) By default, H1 = true, M15 = true, UseM15IfEqualH1 = true - mode when trading is done only on the M15 interval if there are matching signals from the neural network models with signals on the H1 interval.
2) H1 = true, M15 = true, UseM15IfEqualH1 = false - mode when trading is done on the M15 and H1 intervals without considering matching signals from the neural network models with signals on the H1 interval.
3) H1 = true, M15 = false, UseM15IfEqualH1 = false - mode when trading is done only on the H1 interval.
4) H1 = false, M15 = true , UseM15IfEqualH1 = false - mode when trading is done only on the M15 interval.
The profitability of currency pairs can be viewed in the strategy tester after the test in the "Journal" tab, and unprofitable pairs can be disabled as needed in the advisor settings, or the most profitable ones can be selected using the Active option. Before testing, set Active = True for all pairs, and after the test, disable unprofitable pairs by setting Active = False, and you can start trading.
By default, the 9 most profitable pairs out of 28 are selected, but the best results will be shown by the advisor if you load the settings file IntervalAIPairs19Proc5.set
The advisor was trained from 2016 to 2023, and testing in the strategy tester should be done starting from 2023, as the advisor knew nothing about the historical data during training.
- Before testing, it is advisable to choose the EURUSD currency pair and the H1 timeframe.
- In the strategy tester, set the trading mode to " 1 minute OHLC".
- Also, to speed up testing, you can disable the strategy tester’s visualization.
- At the end of the test, you can view the profitability and maximum drawdown of each pair separately in the "Journal" tab.
Description of some advisor settings
- UseSameLotSizeForAllPairs - option to choose the lot size for each pair separately, by default true, one lot size for all, specified by the above parameter.
- UseMaxAllTakeProfitProcent - enables global take profit in percentage of current profit specified in the MaxAllTakeProfitProcent parameter, after which all current orders are closed. Test only on all ticks or 1 minute OHLC.
- UseMaxStopLossProcent - enables global stop loss in percentage of current profit specified in the MaxAllStopLossProcent parameter, after which all current orders are closed. Test only on all ticks or 1 minute OHLC.
- IsDynamicLot - enable automatic lot size formation depending on the balance or free margin.
- is_koef_for_each - if true, the lot size is formed based on the balance for each currency pair separately, if false, then based on the total balance or free margin.
- koef - coefficient for forming the lot size, the higher it is, the greater the risks.
- from - forming the lot size depending on the balance or free margin.
- CountOfGrid - number of pending orders in the grid.
- CountGridBars - number of recent bars in history, from which the lowest and highest price is found for calculating the interval between grid orders: MaxPrice and MinPrice.
- GridKoef - the distance between pending orders in the grid is calculated using the formula (MaxPrice - MinPrice)/ GridKoef.
- GridKoefBegin, GridKoefEnd - distribution of coefficients for multiplying the price of a pending order in the grid.