Уважаемый читатель, в настоящей статье я опишу процесс создания моделей, описывающих закономерность рынка при ограниченном наборе переменных и наличии гипотезы о закономерности его поведения, являющихся результатом работы алгоритма машинного обучения CatBoost от Яндекса. Для получения моделей не потребуется знание таких языков программирования...
I can't print the first five lines of the DataFrame object.
I take the script from the 'data folder'\Scripts\Python\copy_rates_from.py' package and add the lines:
from datetime import datetime
import MetaTrader5 as mt5
# выведем данные о пакете MetaTrader5
print("MetaTrader5 package author: ",mt5.__author__)
print("MetaTrader5 package version: ",mt5.__version__)
# импортируем модуль pandas для вывода полученных данных в табличной форме
import pandas as pd
pd.set_option('display.max_columns', 500) # сколько столбцов показываем
pd.set_option('display.width', 1500) # макс. ширина таблицы для показа
# импортируем модуль pytz для работы с таймзоной
import pytz
# установим подключение к терминалу MetaTrader 5if not mt5.initialize():
print("initialize() failed")
mt5.shutdown()
# установим таймзону в UTC
timezone = pytz.timezone("Etc/UTC")
# создадим объект datetime в таймзоне UTC, чтобы не применялось смещение локальной таймзоны
utc_from = datetime(2020, 1, 10, tzinfo=timezone)
# получим 10 баров с EURUSD H4 начиная с 01.10.2020 в таймзоне UTC
rates = mt5.copy_rates_from("EURUSD", mt5.TIMEFRAME_H4, utc_from, 10)
# завершим подключение к терминалу MetaTrader 5
mt5.shutdown()
# выведем каждый элемент полученных данных на новой строке
print("Выведем полученные данные как есть")
for rate in rates:
print(rate)
# создадим из полученных данных DataFrame
rates_frame = pd.DataFrame(rates)
from datetime import datetime
import MetaTrader5 as mt5
# выведем данные о пакете MetaTrader5
print("MetaTrader5 package author: ",mt5.__author__)
print("MetaTrader5 package version: ",mt5.__version__)
# импортируем модуль pandas для вывода полученных данных в табличной форме
import pandas as pd
pd.set_option('display.max_columns', 500) # сколько столбцов показываем
pd.set_option('display.width', 1500) # макс. ширина таблицы для показа
# импортируем модуль pytz для работы с таймзоной
import pytz
# установим подключение к терминалу MetaTrader 5if not mt5.initialize():
print("initialize() failed")
mt5.shutdown()
# установим таймзону в UTC
timezone = pytz.timezone("Etc/UTC")
# создадим объект datetime в таймзоне UTC, чтобы не применялось смещение локальной таймзоны
utc_from = datetime(2020, 1, 10, tzinfo=timezone)
# получим 10 баров с EURUSD H4 начиная с 01.10.2020 в таймзоне UTC
rates = mt5.copy_rates_from("EURUSD", mt5.TIMEFRAME_H4, utc_from, 10)
# завершим подключение к терминалу MetaTrader 5
mt5.shutdown()
# выведем каждый элемент полученных данных на новой строке
print("Выведем полученные данные как есть")
for rate in rates:
print(rate)
# создадим из полученных данных DataFrame
rates_frame = pd.DataFrame(rates)
# выведем пять первых строк (метод 'head' pandas)
print("\nВыведем пять первых строк")
rates_frame.head()
rates_frame['time']=pd.to_datetime(rates_frame['time'], unit='s')
# выведем данные
print("\nВыведем датафрейм с данными")
print(rates_frame)
rates_frame['time']=pd.to_datetime(rates_frame['time'], unit='s')
# выведем данные
print("\nВыведем датафрейм с данными")
print(rates_frame)
and the method doesn't output anything:
(1578614400, 1.11051, 1.11093, 1.11017, 1.11041, 2448, 1, 0)
Выведем пять первых строк
Выведем датафрейм с данными
Aleksey Vyazmikin: They published my article. I invite you to read it and critique it :)
Alexey, my question to you and to all: Why? Let's take as a target the signal of moving average crossing and not touching it on the next bar...".
You can teach the "ideal" signal. Take a ZZ (several ZZ) and cycle from the present to the past in each bar, which will go exactly up/down, for so many that, so many bars.
When I was a Neuroshell Day Trader Professional, I learned such a signal and got the first sane result.
Alexei, a question to you and everyone else: why? Let's take as a target a signal that crosses a moving average and does not touch it on the next bar..."
You can teach an "ideal" signal. Take a ZZ (several ZZ) and cycle from the present to the past in each bar, which will go exactly up/down, for so many that, so many bars.
When I was a Neuroshell Day Trader Professional, I learned this signal and obtained the first reasonable result.
That's why at that time we didn't know that reversal points are poorly predicted by this method, and training is mostly by trend....
It is quite reasonable to use different strategies for diversification, and MO helps to improve basic strategies, which is what I suggested to use in the article.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Yeah, funny, I'll take note
Some GPT-3 can also put a cotier in it.
Some kind of GPT-3 can also have a cotier in it.
How do I download the *.ipynb file from github to jupyter notebook?
add: The question is removed - something clicked and a download button appeared:
How do I download the *.ipynb file from github to jupyter notebook?
add: The question is removed - something clicked and a download button appeared:
Vladimir, are you with us now, on the dark side?
Vladimir, are you with us now, on the dark side?
I am just learning...
Vladimir, are you with us now, on the dark side?
I can't print the first five lines of the DataFrame object.
I take the script from the 'data folder'\Scripts\Python\copy_rates_from.py' package and add the lines:
and the method doesn't output anything:
They published my article. I invite you to read it and critique it :)
Alexey, my question to you and to all: Why? Let's take as a target the signal of moving average crossing and not touching it on the next bar...".
You can teach the "ideal" signal. Take a ZZ (several ZZ) and cycle from the present to the past in each bar, which will go exactly up/down, for so many that, so many bars.
When I was a Neuroshell Day Trader Professional, I learned such a signal and got the first sane result.
Alexei, a question to you and everyone else: why? Let's take as a target a signal that crosses a moving average and does not touch it on the next bar..."
You can teach an "ideal" signal. Take a ZZ (several ZZ) and cycle from the present to the past in each bar, which will go exactly up/down, for so many that, so many bars.
When I was a Neuroshell Day Trader Professional, I learned this signal and obtained the first reasonable result.
That's why at that time we didn't know that reversal points are poorly predicted by this method, and training is mostly by trend....
It is quite reasonable to use different strategies for diversification, and MO helps to improve basic strategies, which is what I suggested to use in the article.