← Atrás

Hydra. Первый запуск. Работа с БД

Здравствуйте!

БД создана, пользователь создан (MS SQL 2008 Standard). При первом запуске Hydra выдаёт сообщение, ключевой (как я считаю) фразой является: "... Сохранённая процедура "Exchange_Count" не существует."

Предполагаю, что Гидра сама создаёт все бизнесс-правила на сервере? Какова может быть причина ошибки?

Заранее благодарю за ответ.

¿Le resultó útil este tema?

Compartir tema

Comentarios (96)

Iniciar sesión o Crear cuenta, Inicie sesión o regístrese para dejar un comentario

Mikhail Sukhov
Mikhail Sukhov

Вы все шаги сделали, которые описаны в документации?

sunmoon
sunmoon
sunmoon Autor

Проблема решена. Пропустил выполнение скрипта по созданию базы.

В документации не чётко прописано, что надо делать. Раздел "Установка и работа" ссылается на раздел "Хранение данных", в котором нет никакого побуждения к действию :) И лишь в разделе "База данных" можно найти перечень действий.

Михаил, спасибо за быстрый ответ.

sunmoon
sunmoon Autor

После создания БД, и настройки пары инструментов для загрузки, при запуске Гидры появляется данное сообщение:

Mikhail Sukhov
Mikhail Sukhov

sunmoon: После создания БД, и настройки пары инструментов для загрузки, при запуске Гидры появляется данное сообщение:

Попробуйте с этим скриптом http://box.net/files#/files/0/f/81416442/1/f_712810806 . Нужно будет дропнуть базу.

Sajan
Sajan

После установки при запуске скрипта trading.sql возникла ошибка. Чего делать?

Сообщение 22002, уровень 16, состояние 1, строка 0
RegCreateKeyEx() – возвращена ошибка 5, "Отказано в доступе."
Необходимо перезапустить SQL Server
Сообщение 15025, уровень 16, состояние 1, строка 41
Сервер-участник "trading" уже существует.
Сообщение 102, уровень 15, состояние 1, строка 2
Неправильный синтаксис около конструкции "100".
Сообщение 102, уровень 15, состояние 6, строка 2
Неправильный синтаксис около конструкции "HONOR_BROKER_PRIORITY".
Сообщение 2715, уровень 16, состояние 7, строка 1
Столбец, параметр или переменная #3: невозможно найти тип данных time.
Сообщение 2715, уровень 16, состояние 7, строка 1
Столбец, параметр или переменная #24: невозможно найти тип данных datetime2.
Сообщение 2715, уровень 16, состояние 3, процедура MarketDataSourceSettings_UpdateBySourceId, строка 1
Столбец, параметр или переменная #3: невозможно найти тип данных time.
Параметр или переменная "@WorkingFrom" имеет недопустимый тип данных.
Сообщение 2715, уровень 16, состояние 3, процедура MarketDataSourceSettings_UpdateBySourceId, строка 1
Столбец, параметр или переменная #4: невозможно найти тип данных time.
Параметр или переменная "@WorkingTo" имеет недопустимый тип данных.
Сообщение 2715, уровень 16, состояние 3, процедура MarketDataSourceSettings_UpdateBySourceId, строка 1
Столбец, параметр или переменная #5: невозможно найти тип данных time.
Параметр или переменная "@Interval" имеет недопустимый тип данных.
Сообщение 2715, уровень 16, состояние 3, процедура Security_UpdateById, строка 1
Столбец, параметр или переменная #24: невозможно найти тип данных datetime2.
Параметр или переменная "@LastTradeTime" имеет недопустимый тип данных.
Сообщение 1767, уровень 16, состояние 0, строка 2
Внешний ключ "FK_HydraSecurityInfo_Security" ссылается на недопустимую таблицу "dbo.Security".
Сообщение 1750, уровень 16, состояние 0, строка 2
Нельзя создать ограничение. См. предыдущие ошибки.
Сообщение 4917, уровень 16, состояние 0, строка 1
Ограничение "FK_HydraSecurityInfo_Security" не существует.
Сообщение 4916, уровень 16, состояние 0, строка 1
Невозможно включить или отключить ограничение. См. предыдущие ошибки.
Сообщение 1767, уровень 16, состояние 0, строка 2
Внешний ключ "FK_Order_Security" ссылается на недопустимую таблицу "dbo.Security".
Сообщение 1750, уровень 16, состояние 0, строка 2
Нельзя создать ограничение. См. предыдущие ошибки.
Сообщение 4917, уровень 16, состояние 0, строка 1
Ограничение "FK_Order_Security" не существует.
Сообщение 4916, уровень 16, состояние 0, строка 1
Невозможно включить или отключить ограничение. См. предыдущие ошибки.
Сообщение 1767, уровень 16, состояние 0, строка 2
Внешний ключ "FK_Position_Security" ссылается на недопустимую таблицу "dbo.Security".
Сообщение 1750, уровень 16, состояние 0, строка 2
Нельзя создать ограничение. См. предыдущие ошибки.
Сообщение 4917, уровень 16, состояние 0, строка 1
Ограничение "FK_Position_Security" не существует.
Сообщение 4916, уровень 16, состояние 0, строка 1
Невозможно включить или отключить ограничение. См. предыдущие ошибки.
Сообщение 4902, уровень 16, состояние 1, строка 2
Не удалось найти объект "dbo.Security", так как он не существует, или отсутствуют разрешения.
Сообщение 4902, уровень 16, состояние 1, строка 1
Не удалось найти объект "dbo.Security", так как он не существует, или отсутствуют разрешения.
Сообщение 1767, уровень 16, состояние 0, строка 2
Внешний ключ "FK_Trade_Security" ссылается на недопустимую таблицу "dbo.Security".
Сообщение 1750, уровень 16, состояние 0, строка 2
Нельзя создать ограничение. См. предыдущие ошибки.
Сообщение 4917, уровень 16, состояние 0, строка 1
Ограничение "FK_Trade_Security" не существует.
Сообщение 4916, уровень 16, состояние 0, строка 1
Невозможно включить или отключить ограничение. См. предыдущие ошибки.
Сообщение 15151, уровень 16, состояние 1, строка 1
Невозможно найти объект "MarketDataSourceSettings_UpdateBySourceId", так как он не существует или отсутствуют разрешения.
Сообщение 15151, уровень 16, состояние 1, строка 1
Невозможно найти объект "Security_UpdateById", так как он не существует или отсутствуют разрешения.
Параметр конфигурации "clr enabled" изменен с 1 на 1. Выполните инструкцию RECONFIGURE для установки.

При запуске Hydra возникла ошибка, но привести не могу, т.к. не нашёл, как прикрепить (закачать) картинку.

Mikhail Sukhov
Mikhail Sukhov

Sajan: После установки при запуске скрипта trading.sql возникла ошибка. Чего делать?

Как оказалась, формат моего скрипта не совместим с ms sql 2005. Или писать свой, или использовать 2008.

Sajan
Sajan

А как прикреплять картинки к посту? У меня Гидра всё-равно ругается, а как скрины показать, не знаю:) Поставил 2008. А это чего, я так понимаю, всё нормально?:)``` (0 row(s) affected) Необходимо перезапустить SQL Server Msg 15025, Level 16, State 1, Line 41 The server principal 'trading' already exists. Configuration option 'clr enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.

Mikhail Sukhov
Mikhail Sukhov

Sajan: А как прикреплять картинки к посту? У меня Гидра всё-равно ругается, а как скрины показать, не знаю:) Поставил 2008. А это чего, я так понимаю, всё нормально?:)``` (0 row(s) affected) Необходимо перезапустить SQL Server Msg 15025, Level 16, State 1, Line 41 The server principal 'trading' already exists. Configuration option 'clr enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.


Ctrl+C на окно.
Sajan
Sajan
---------------------------
Гидра - ошибка базы данных.
---------------------------
System.Data.SqlClient.SqlException: При установлении соединения с SQL Server произошла ошибка, связанная с сетью или с определенным экземпляром. Сервер не найден или недоступен. Убедитесь, что имя экземпляра указано правильно и что на SQL Server разрешены удаленные соединения. (provider: Поставщик именованных каналов, error: 40 - Не удалось открыть подключение к SQL Server)

   в System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   в System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

   в System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)

   в System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)

   в System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)

   в System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

   в System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

   в System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

   в System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

   в System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

   в System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

   в System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

   в System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

   в System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

   в System.Data.SqlClient.SqlConnection.Open()

   в Ecng.Data.DatabaseProvider.CreateConnection(String connectionString)

   в Ecng.Data.Database.CreateConnection()

   в Ecng.Data.Database.<>c__DisplayClass7.<GetCommand>b__6(Query )

   в Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler)

   в Ecng.Data.Database.GetCommand(Query commandQuery, SerializationItemCollection source)

   в Ecng.Data.HierarchicalDatabase.GetCommand(Schema schema, SqlCommandTypes type, FieldCollection keyFields, FieldCollection valueFields, SerializationItemCollection source)

   в Ecng.Data.Database.GetCount(Schema schema)

   в Ecng.Data.Database.GetCount[TEntity]()

   в Ecng.Serialization.RelationManyList`1.OnGetCount()

   в Ecng.Data.HierarchicalPageLoadList`1.OnGetCount()

   в Ecng.Serialization.RelationManyList`1.ReadAll(Int64 startIndex, Int64 count, Field orderBy, SortDirection direction)

   в Ecng.Serialization.RelationManyList`1.GetRange(Int64 startIndex, Int64 count, String sortExpression, SortDirection directions)

   в Ecng.Collections.BaseListEx`1.GetRange(Int64 startIndex, Int64 count)

   в Ecng.Serialization.RelationManyList`1.get_Count()

   в Ecng.Trading.Hydra.MainWindow..ctor() в E:\StockSharpReleases\StockSharp_3.0.19\Sources\Hydra\Hydra\MainWindow.xaml.cs:строка 43
---------------------------
ОК   
---------------------------

Mikhail Sukhov
Mikhail Sukhov

Что-то не так с БД. Подпробуйте к ней подключиться через Management Studio, указав логин и пароль Гидры.

Sajan
Sajan

Mikhail Sukhov: Что-то не так с БД. Подпробуйте к ней подключиться через Management Studio, указав логин и пароль Гидры. Попробовал в Management Studio подключиться к базе (SQL Server Authentification), используя логин:trading, пароль:trading (взял из Hydra.exe.config).``` TITLE: Connect to Server


Cannot connect to LSX\SQLEXPRESS.


ADDITIONAL INFORMATION:

Login failed for user 'trading'. (Microsoft SQL Server, Error: 18456)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476


BUTTONS:

OK

Mikhail Sukhov
Mikhail Sukhov

А вы скрипт запускали для создания БД и пользователя trading в Sql Server-е?

Sajan
Sajan

Mikhail Sukhov: А вы скрипт запускали для создания БД и пользователя trading в Sql Server-е?В SQL Server 2008 Management Studio. Может, я что-то не так понял?

Mikhail Sukhov
Mikhail Sukhov

Sajan:

Mikhail Sukhov: А вы скрипт запускали для создания БД и пользователя trading в Sql Server-е?В SQL Server 2008 Management Studio. Может, я что-то не так понял?

Все правильно. А скрипт то запускали? Он отработал?

Sajan
Sajan

Mikhail Sukhov: Все правильно. А скрипт то запускали? Он отработал?Отработал.


(0 row(s) affected)
Необходимо перезапустить SQL Server
Msg 15025, Level 16, State 1, Line 41
The server principal 'trading' already exists.
Msg 1801, Level 16, State 3, Line 3
Database 'Trading' already exists. Choose a different database name.
Msg 15023, Level 16, State 1, Line 2
User, group, or role 'trading' already exists in the current database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Exchange' in the database.
Msg 6246, Level 16, State 1, Line 2
Assembly "Ecng.Data.SqlServer" already exists in database "Trading".
Msg 6249, Level 16, State 1, Line 1
The associated file "Ecng.Data.SqlServer.pdb" already exists for assembly "Ecng.Data.SqlServer".
Msg 6249, Level 16, State 1, Line 1
The associated file "Properties\AssemblyInfo.cs" already exists for assembly "Ecng.Data.SqlServer".
Msg 6249, Level 16, State 1, Line 1
The associated file "SqlExtendedProcedures.cs" already exists for assembly "Ecng.Data.SqlServer".
Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37
Property cannot be added. Property 'AutoDeployed' already exists for 'Ecng.Data.SqlServer'.
Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37
Property cannot be added. Property 'SqlAssemblyProjectRoot' already exists for 'Ecng.Data.SqlServer'.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'MarketDataSourceSettings' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'HistorySession' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Strategy' in the database.
Msg 2714, Level 16, State 3, Procedure usp_RethrowError, Line 26
There is already an object named 'usp_RethrowError' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Security' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Portfolio' in the database.
Msg 2714, Level 16, State 51, Procedure PageSelect, Line 2
There is already an object named 'PageSelect' in the database.
Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37
Property cannot be added. Property 'AutoDeployed' already exists for 'dbo.PageSelect'.
Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37
Property cannot be added. Property 'SqlAssemblyFile' already exists for 'dbo.PageSelect'.
Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37
Property cannot be added. Property 'SqlAssemblyFileLine' already exists for 'dbo.PageSelect'.
Msg 2714, Level 16, State 3, Procedure MarketDataSourceSettings_UpdateBySourceId, Line 27
There is already an object named 'MarketDataSourceSettings_UpdateBySourceId' in the database.
Msg 2714, Level 16, State 3, Procedure MarketDataSourceSettings_ReadBySourceId, Line 4
There is already an object named 'MarketDataSourceSettings_ReadBySourceId' in the database.
Msg 2714, Level 16, State 3, Procedure HistorySession_Count, Line 3
There is already an object named 'HistorySession_Count' in the database.
Msg 2714, Level 16, State 3, Procedure Exchange_Count, Line 3
There is already an object named 'Exchange_Count' in the database.
Msg 2714, Level 16, State 3, Procedure Exchange_UpdateByName, Line 18
There is already an object named 'Exchange_UpdateByName' in the database.
Msg 2714, Level 16, State 3, Procedure Exchange_ReadByName, Line 4
There is already an object named 'Exchange_ReadByName' in the database.
Msg 2714, Level 16, State 3, Procedure Exchange_ReadAll, Line 6
There is already an object named 'Exchange_ReadAll' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'HydraSecurityInfo' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Order' in the database.
Msg 2714, Level 16, State 3, Procedure HistorySession_ReadAll, Line 6
There is already an object named 'HistorySession_ReadAll' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Position' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Trade' in the database.
Msg 2714, Level 16, State 3, Procedure Security_ReadAll, Line 6
There is already an object named 'Security_ReadAll' in the database.
Msg 2714, Level 16, State 3, Procedure Security_Count, Line 3
There is already an object named 'Security_Count' in the database.
Msg 2714, Level 16, State 3, Procedure Security_UpdateById, Line 148
There is already an object named 'Security_UpdateById' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'OrderFail' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'MyTrade' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'HistorySessionOrder' in the database.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_HistorySessionOrder_Order' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_HistorySessionOrder_Session' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_HydraSecurityInfo_Security' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_MyTrade_Order' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_MyTrade_Trade' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Order_Portfolio' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Order_Security' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_OrderFail_Order' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Portfolio_Exchange' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Position_Portfolio' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Position_Security' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Security_Exchange' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 4, Line 2
There is already an object named 'FK_Trade_Security' in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.
Configuration option 'clr enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.

DT
DT

Аналогичная ситуация. Win 7 Pro 64Bit (Eng), SQL Server 2008 R2 64Bit,(Eng). Из Management Studio выполняю скрипт trading.sql. Получаю сообщения

Msg 22002, Level 16, State 1, Line 0 RegCreateKeyEx() returned error 5, 'Access is denied.' Необходимо перезапустить SQL Server Msg 15025, Level 16, State 1, Line 41 The server principal 'trading' already exists. Msg 5133, Level 16, State 1, Line 3 Directory lookup for the file "C:\StockSharp\Trading.mdf" failed with the operating system error 2(failed to retrieve text for this error. Reason: 15100). Msg 1802, Level 16, State 1, Line 3 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 5011, Level 14, State 5, Line 2 User does not have permission to alter database 'Trading', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 2 ALTER DATABASE statement failed. Msg 911, Level 16, State 1, Line 2 Database 'trading' does not exist. Make sure that the name is entered correctly. Msg 15023, Level 16, State 1, Line 3 User, group, or role 'trading' already exists in the current database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Exchange' in the database. Msg 6246, Level 16, State 1, Line 2 Assembly "Ecng.Data.SqlServer" already exists in database "master". Msg 6249, Level 16, State 1, Line 1 The associated file "Ecng.Data.SqlServer.pdb" already exists for assembly "Ecng.Data.SqlServer". Msg 6249, Level 16, State 1, Line 1 The associated file "Properties\AssemblyInfo.cs" already exists for assembly "Ecng.Data.SqlServer". Msg 6249, Level 16, State 1, Line 1 The associated file "SqlExtendedProcedures.cs" already exists for assembly "Ecng.Data.SqlServer". Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37 Property cannot be added. Property 'AutoDeployed' already exists for 'Ecng.Data.SqlServer'. Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37 Property cannot be added. Property 'SqlAssemblyProjectRoot' already exists for 'Ecng.Data.SqlServer'. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'MarketDataSourceSettings' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'HistorySession' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Strategy' in the database. Msg 2714, Level 16, State 3, Procedure usp_RethrowError, Line 26 There is already an object named 'usp_RethrowError' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Security' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Portfolio' in the database. Msg 2714, Level 16, State 51, Procedure PageSelect, Line 2 There is already an object named 'PageSelect' in the database. Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37 Property cannot be added. Property 'AutoDeployed' already exists for 'dbo.PageSelect'. Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37 Property cannot be added. Property 'SqlAssemblyFile' already exists for 'dbo.PageSelect'. Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 37 Property cannot be added. Property 'SqlAssemblyFileLine' already exists for 'dbo.PageSelect'. Msg 2714, Level 16, State 3, Procedure MarketDataSourceSettings_UpdateBySourceId, Line 22 There is already an object named 'MarketDataSourceSettings_UpdateBySourceId' in the database. Msg 2714, Level 16, State 3, Procedure MarketDataSourceSettings_ReadBySourceId, Line 4 There is already an object named 'MarketDataSourceSettings_ReadBySourceId' in the database. Msg 2714, Level 16, State 3, Procedure HistorySession_Count, Line 3 There is already an object named 'HistorySession_Count' in the database. Msg 2714, Level 16, State 3, Procedure Exchange_Count, Line 3 There is already an object named 'Exchange_Count' in the database. Msg 2714, Level 16, State 3, Procedure Exchange_UpdateByName, Line 18 There is already an object named 'Exchange_UpdateByName' in the database. Msg 2714, Level 16, State 3, Procedure Exchange_ReadByName, Line 4 There is already an object named 'Exchange_ReadByName' in the database. Msg 2714, Level 16, State 3, Procedure Exchange_ReadAll, Line 6 There is already an object named 'Exchange_ReadAll' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'HydraSecurityInfo' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Order' in the database. Msg 2714, Level 16, State 3, Procedure HistorySession_ReadAll, Line 6 There is already an object named 'HistorySession_ReadAll' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Position' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'Trade' in the database. Msg 2714, Level 16, State 3, Procedure Security_ReadAll, Line 6 There is already an object named 'Security_ReadAll' in the database. Msg 2714, Level 16, State 3, Procedure Security_Count, Line 3 There is already an object named 'Security_Count' in the database. Msg 2714, Level 16, State 3, Procedure Security_UpdateById, Line 160 There is already an object named 'Security_UpdateById' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'OrderFail' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'MyTrade' in the database. Msg 2714, Level 16, State 6, Line 1 There is already an object named 'HistorySessionOrder' in the database. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_HistorySessionOrder_Order' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_HistorySessionOrder_Session' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_HydraSecurityInfo_Security' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_MyTrade_Order' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_MyTrade_Trade' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Order_Portfolio' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Order_Security' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_OrderFail_Order' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Portfolio_Exchange' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Position_Portfolio' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Position_Security' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Security_Exchange' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 2714, Level 16, State 4, Line 2 There is already an object named 'FK_Trade_Security' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Configuration option 'clr enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.

Через Панель управления - сервисы перезапускаю SQL Server (MSSQLSERVER). Все остается то же самое.

Спасибо.

Спасибо!

Mikhail Sukhov
Mikhail Sukhov

Directory lookup for the file "C:\StockSharp\Trading.mdf"

Создайте руками директорию.

DT
DT

База Trading создалась.

SQL Server под Windows Authentification, Windows login = Dima.

В Management Studio -> Object Explorer сервер виден как (local)(SQL Server 10.50.1600 - Dima-THINK\Dima)

При запуске Hydra.exe выдает ошибку http://narod.yandex.ru/disk/13784696001/Hydra%20capture.PNG

пробовал разные варианты логина в hydra config-файле: Dima-THINK\Dimа...

Спасибо.

Mikhail Sukhov
Mikhail Sukhov

DT: пробовал разные варианты логина в hydra config-файле: Dima-THINK\Dimа...

Спасибо.

В скрипте явно прописан пользователь (trading, одноименно с БД). Если вы хотите под другим, то нужно переделать скрипт.

SergKuz
SergKuz

Добрый день! Я не программист, но опыт программирования стратегий несколько лет, с базами тоже на любительском уровне работаю давно. Я скачал дистрибутив тут: http://www.box.net/stocksharp/1/97195598 скачал все 3 файла, но найти trading.sql мне не удалось. Его надо где-то в другом месте скачивать?

Mikhail Sukhov
Mikhail Sukhov

SergKuz: Его надо где-то в другом месте скачивать?

Забыл выложить. Теперь есть.

DT
DT

переставил SQL Server R2 c логином и паролем tading, запустил скрипт, БД Trading создалась (попросила перезапустить, перезапустил через сервисы). При запуске Гидры всне равно выдается ошибка Гидра- ошибка БД

Any idea?

Mikhail Sukhov
Mikhail Sukhov

DT: переставил SQL Server R2 c логином и паролем tading, запустил скрипт, БД Trading создалась (попросила перезапустить, перезапустил через сервисы). При запуске Гидры всне равно выдается ошибка Гидра- ошибка БД

Any idea?

Чтобы точно понять, в чем проблема, попробуйте из под Management Studio зайти под учеткой trading в созданную БД.

DT
DT

Нашел, в чем была проблема! SQL Server был установлен с идентификацией, общей с Windows. Проблема решилась после переустановки со смешанной идентификацией.

БД открывалась, не спрашивая логина и пароля, но при попытке их ввести выдавала ошибку.

Swaip
Swaip

Подскажите пожалуйста в чем ошибка...база установлена, есть два выделенных инструмента, Нажимаю СТАРТ - выдается данная ошибка Заранее спасибо.

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID failed due to the following error: 80040154.

at Ecng.Trading.Smart.SmartComWrapper.Connect()

at Ecng.Trading.Smart.SmartTrader.OnConnect()

at Ecng.Trading.Algo.BaseTrader.Connect()

at Ecng.Trading.Hydra.Core.MarketDataTrader.Start() in E:\StockSharpReleases\StockSharp_3.1.10\Sources\Hydra\Core\MarketDataTrader.cs:line 126

at Ecng.Trading.Hydra.Smart.SmartDepthSource.Start(IEnumerable`1 securities) in E:\StockSharpReleases\StockSharp_3.1.10\Sources\Hydra\Plugins\Smart\SmartDepthSource.cs:line 155

at Ecng.Trading.Hydra.Worker.<Start>b__5(IMarketDataSource source) in E:\StockSharpReleases\StockSharp_3.1.10\Sources\Hydra\Hydra\Worker.cs:line 58

at Ecng.Collections.CollectionHelper.ForEach(IEnumerable1 source, Action1 action)

at Ecng.Trading.Hydra.Worker.Start(IEnumerable`1 securities) in E:\StockSharpReleases\StockSharp_3.1.10\Sources\Hydra\Hydra\Worker.cs:line 58

at Ecng.Trading.Hydra.MainWindow.StartStop_Click(Object sender, RoutedEventArgs e) in E:\StockSharpReleases\StockSharp_3.1.10\Sources\Hydra\Hydra\MainWindow.xaml.cs:line 166

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

at System.Windows.Controls.Primitives.ButtonBase.OnClick()

at System.Windows.Controls.Button.OnClick()

at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)

at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

at System.Windows.Input.InputManager.ProcessStagingArea()

at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)

at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

Swaip
Swaip

Понял что данная ошибка появлятся если задействован источник SmartCOM...если на нем нет галочки использовать,то все норм...может там каие-то другие настройки...или надо самому пересоздвавать источник для SmartCOM...подскажите пожалуйста

Swaip
Swaip

Продолжаю монолог...оказалась ошибка в том что не было установлено COM-объекта, но после этого все равно дальше продолжаются ошибки такого плана

То вылетает:



System.ArgumentNullException: Value cannot be null.

Parameter name: securityId

at StockSharp.Smart.SmartComWrapper.RegisterQuotes(String securityId)

at StockSharp.Smart.SmartTrader.RegisterQuotes(Security security)

at Ecng.Collections.CollectionHelper.ForEach(IEnumerable1 source, Action1 action)

at StockSharp.Hydra.Smart.SmartDepthSource.Start(IEnumerable`1 securities) in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Plugins\Smart\SmartDepthSource.cs:line 184

at StockSharp.Hydra.Worker.Start(IEnumerable`1 securities) in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Hydra\Worker.cs:line 66

at StockSharp.Hydra.MainWindow.StartStop_Click(Object sender, RoutedEventArgs e) in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Hydra\MainWindow.xaml.cs:line 176

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

at System.Windows.Controls.Primitives.ButtonBase.OnClick()

at System.Windows.Controls.Button.OnClick()

at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)

at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

at System.Windows.Input.InputManager.ProcessStagingArea()

at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)

at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

2)


System.Runtime.InteropServices.COMException (0x800706BA): Сервер RPC недоступен. (Exception from HRESULT: 0x800706BA)

at StClientLib.StServerClass.disconnect()

at StockSharp.Smart.SmartComWrapper.#=q9$FM0y9WbqXd0Qvu$jgD6sUfm5_sN4xJZJ6sOJSbAo8=(StServer #=qStemZJuYZTJ$V6$RvEW4PA==)

at StockSharp.Smart.SmartComWrapper.#=qKGBX2c7M9lrrSdiegogLYA==(Action`1 #=qHZ0YT8Q$dMlMqKQD8HYGNQ==)

at StockSharp.Smart.SmartComWrapper.Disconnect()

at StockSharp.Smart.SmartComWrapper.DisposeManaged()

at Ecng.Common.Disposable.Dispose()

at StockSharp.Smart.SmartTrader.DisposeManaged()

at Ecng.Common.Disposable.Dispose()

at StockSharp.Hydra.Core.MarketDataTrader.Start() in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Core\MarketDataTrader.cs:line 154

at StockSharp.Hydra.Smart.SmartDepthSource.Start(IEnumerable`1 securities) in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Plugins\Smart\SmartDepthSource.cs:line 178

at StockSharp.Hydra.Worker.Start(IEnumerable`1 securities) in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Hydra\Worker.cs:line 66

at StockSharp.Hydra.MainWindow.StartStop_Click(Object sender, RoutedEventArgs e) in E:\StockSharpReleases\StockSharp_3.2.5\Hydra\Hydra\MainWindow.xaml.cs:line 176

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

at System.Windows.Controls.Primitives.ButtonBase.OnClick()

at System.Windows.Controls.Button.OnClick()

at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)

at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

at System.Windows.Input.InputManager.ProcessStagingArea()

at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)

at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

Alexander
Alexander
  1. что за инструмент? ошибка говорит о том, что идентификатор строковый инструмента = null
  2. как часто наблюдается, в какое время? Это проблемы смарткома, он барахлит.
Lera
Lera

Здравствуйте, Подскажите, в чем может быть проблема? Вылезает следующий эксепшн при запуске гидры. Все шаги в документации выполнены

Mikhail Sukhov
Mikhail Sukhov

Lera: Здравствуйте, Подскажите, в чем может быть проблема? Вылезает следующий эксепшн при запуске гидры. Все шаги в документации выполнены

Это значит предыдущая запущенная Гидра висит в памяти (посмотрите в диспетчере задач). Она при старте первый раз не ругалась? Еще лог желательно проверять.

Lera
Lera

Большое спасибо, все заработало)

Mikhail Sukhov:

Lera: Здравствуйте, Подскажите, в чем может быть проблема? Вылезает следующий эксепшн при запуске гидры. Все шаги в документации выполнены

Это значит предыдущая запущенная Гидра висит в памяти (посмотрите в диспетчере задач). Она при старте первый раз не ругалась? Еще лог желательно проверять.

foRs
foRs

а можно гидру без базы запускать? мне просто нужны данные с финама. неужеле по-любому базу надо ставить?

SoWar
SoWar

Добрый день. При первом запуске гидры 4.0.7 в логе пишется следующее:

Гидра 09:44:49.8806799 System.InvalidOperationException: Невозможно задать в свойстве Owner объект Window, который не был показан ранее. в System.Windows.Window.set_Owner(Window value) в Microsoft.Windows.Controls.MessageBox.CreateContainer() в Microsoft.Windows.Controls.MessageBox.InitializeMessageBox(Window owner, String text, String caption, MessageBoxButton button, MessageBoxImage image, MessageBoxResult defaultResult) в Microsoft.Windows.Controls.MessageBox.ShowCore(Window owner, String messageText, String caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) в Microsoft.Windows.Controls.MessageBox.Show(Window owner, String messageText, String caption, MessageBoxButton button) в Microsoft.Windows.Controls.MessageBox.Show(Window owner, String messageText) в StockSharp.Hydra.App.Application_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e) в F:\Sources\StockSharpReleases\StockSharp_4.0.7\Hydra\Hydra\App.xaml.cs:строка 12 в System.Windows.Threading.Dispatcher.CatchException(Exception e) в System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e) в System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler) в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) в System.Windows.Application.RunDispatcher(Object ignore) в System.Windows.Application.RunInternal(Window window) в System.Windows.Application.Run(Window window) в System.Windows.Application.Run() в StockSharp.Hydra.App.Main() в F:\Sources\StockSharpReleases\StockSharp_4.0.7\Hydra\Hydra\obj\Debug\App.g.cs:строка 0

Гидра в принципе не запускается. Только несколько секунд в памяти висит и закрывается виндой из-за ошибки. База данных SQL 2008 R2 SP3 Express. Конфиг поменял под неё. Войти в БД под trading можно. В чем может быть проблема?

Alexander
Alexander

Попробуйте с codeplex утянуть последнюю версию, там фикс был.

SoWar
SoWar

Alexander Mukhanchikov: Попробуйте с codeplex утянуть последнюю версию, там фикс был. К сожалению я не программист, поэтому много чего не знаю и не умею. Я правильно понимаю, что надо скачать исходники гидры и пересобрать проект? У меня стоит Visual Studio C# 2010 Express и при загрузке Hydra.sln говорит, что папки решений не поддерживаются в этой версии. Не могли бы Вы выложить новую гидру отдельно?

Alexander
Alexander

SoWar:

Alexander Mukhanchikov: Попробуйте с codeplex утянуть последнюю версию, там фикс был. К сожалению я не программист, поэтому много чего не знаю и не умею. Я правильно понимаю, что надо скачать исходники гидры и пересобрать проект? У меня стоит Visual Studio C# 2010 Express и при загрузке Hydra.sln говорит, что папки решений не поддерживаются в этой версии. Не могли бы Вы выложить новую гидру отдельно?

на ворнинг VS Express можно внимания не обращать. Да, просто собрать и использовать. Выложим новую версию в течение недели, пока есть ещё что фиксить.

SoWar
SoWar

Спасибо за оперативную реакцию. Установил VS2010 Pro и построил проект. Из папки Hydra\bin\Debug\ запускаю Hydra.exe. Ошибок нет, к базе подключается, но в окне "Настройки" нет никаких опций для выбора источника. Версия кода 12335.

Alexander
Alexander

SoWar: Спасибо за оперативную реакцию. Установил VS2010 Pro и построил проект. Из папки Hydra\bin\Debug\ запускаю Hydra.exe. Ошибок нет, к базе подключается, но в окне "Настройки" нет никаких опций для выбора источника. Версия кода 12335.

Скриншот приведите. Для какого инструмента источник пытаетесь выбрать?

SoWar
SoWar

Alexander Mukhanchikov: Скриншот приведите. Для какого инструмента источник пытаетесь выбрать? Выпадающее меню источников пусто. Инструмент, соответственно, добавлять не могу.

Alexander
Alexander

И что выводится в лог? У меня даже при пустом числе инструментов всё нормально отображается (версия - последняя с codeplex)

SoWar
SoWar

Alexander Mukhanchikov: И что выводится в лог? У меня даже при пустом числе инструментов всё нормально отображается (версия - последняя с codeplex) Гидра 17:08:24.3859425 System.InvalidCastException: Не удалось преобразовать значение параметра из Int64 в TimeSpan. ---> System.InvalidCastException: Недопустимое приведение "System.Int64" к "System.TimeSpan". в System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) в System.Int64.System.IConvertible.ToType(Type type, IFormatProvider provider) в System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) в System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) --- Конец трассировки внутреннего стека исключений --- в System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) в System.Data.SqlClient.SqlParameter.GetCoercedValue() в System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) в System.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPC rpc, Int32 startCount, Boolean inSchema, SqlParameterCollection parameters) в System.Data.SqlClient.SqlCommand.BuildRPC(Boolean inSchema, SqlParameterCollection parameters, _SqlRPC& rpc) в System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) в System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) в System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) в System.Data.SqlClient.SqlCommand.ExecuteNonQuery() в Ecng.Data.DatabaseCommand.<ExecuteNonQuery>b__6(DbCommand cmd) в Ecng.Data.DatabaseCommand.<>c__DisplayClass41.<Execute>b__1(DbConnection connection) в Ecng.Data.Database.GetConnection(Action1 action) в Ecng.Data.DatabaseCommand.Execute[TResult](IEnumerable1 input, Func2 handler) в Ecng.Data.DatabaseCommand.ExecuteNonQuery(SerializationItemCollection input) в Ecng.Data.Database.Execute(DatabaseCommand command, SerializationItemCollection source, Boolean needRetVal) в Ecng.Data.Database.Update(DatabaseCommand command, SerializationItemCollection source, Boolean needRetVal) в Ecng.Data.Database.<>c__DisplayClass111.<Update>b__10() в Ecng.Data.Database.Update[TEntity](TEntity entity, FieldCollection keyFields, FieldCollection valueFields) в Ecng.Data.Database.Update[TEntity](TEntity entity, FieldCollection valueFields) в Ecng.Data.Database.Update[TEntity](TEntity entity) в Ecng.Serialization.RelationManyList1.OnUpdate(TEntity entity) в Ecng.Data.HierarchicalPageLoadList1.OnUpdate(TEntity entity) в Ecng.Serialization.RelationManyList1.Update(TEntity entity) в StockSharp.Algo.Storages.BaseStorageEntityList1.Save(T entity) в StockSharp.Hydra.Core.BaseMarketDataSource.SaveSettings() в E:\Temporary\stocksharp-12335\Hydra\Core\BaseMarketDataSource.cs:строка 61 в StockSharp.Hydra.Finam.FinamSource.SaveSettings() в E:\Temporary\stocksharp-12335\Hydra\Plugins\Finam\FinamSource.cs:строка 127 в StockSharp.Hydra.Core.BaseMarketDataSource..ctor(HydraStorage storage, Guid id) в E:\Temporary\stocksharp-12335\Hydra\Core\BaseMarketDataSource.cs:строка 93 в StockSharp.Hydra.Finam.FinamSource..ctor(HydraStorage storage) в E:\Temporary\stocksharp-12335\Hydra\Plugins\Finam\FinamSource.cs:строка 94 в (HydraStorage arg) в Ecng.Reflection.FastInvoker3.Ctor(A arg) в Ecng.Reflection.FastInvoker3.Ctor(Object arg) в Ecng.Reflection.ReflectionHelper.CreateInstance(ConstructorInfo ctor, Object arg) в Ecng.Reflection.ReflectionHelper.CreateInstance(Type type, Object arg) в Ecng.Reflection.ReflectionHelper.CreateInstance(Type type, Object arg) в StockSharp.Hydra.MainWindow.<.ctor>b__4(Type t) в E:\Temporary\stocksharp-12335\Hydra\Hydra\MainWindow.xaml.cs:строка 118 в System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() в System.Linq.Buffer1..ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) в StockSharp.Hydra.MainWindow..ctor() в E:\Temporary\stocksharp-12335\Hydra\Hydra\MainWindow.xaml.cs:строка 115

pyhta4og
pyhta4og

В этой версии был update базы SQL Server. Пересоздайте таблицу MarketDataSourceSettings и процедуру MarketDataSourceSettings_Update... нужно изменить тип полей с time на bigint.

В репозитории codeplex в Documentatin/trading.sql лежит скрипт создания БД.

SoWar
SoWar

pyhta4og: В этой версии был update базы SQL Server. Пересоздайте таблицу MarketDataSourceSettings и процедуру MarketDataSourceSettings_Update... нужно изменить тип полей с time на bigint.

В репозитории codeplex в Documentatin/trading.sql лежит скрипт создания БД. Удалил старую базу. Скриптом из 12335 создал новую. Не помогло. Лог не изменился. Update: в указанной Вами таблице тип полей остался тайм. С SSMS я не работал раньше, но попытаюсь изменить тип.

Alexander
Alexander

12366 нужно

SoWar
SoWar

Alexander Mukhanchikov: 12366 нужно Скачал, собрал, исправил конфиг под SQL Server, в котором скриптом создал новую БД. Войти в неё можно. Гидра не запускается. Лог стал снова таким: Гидра 17:56:54.8504116 System.InvalidOperationException: Невозможно задать в свойстве Owner объект Window, который не был показан ранее. в System.Windows.Window.set_Owner(Window value) в Microsoft.Windows.Controls.MessageBox.CreateContainer() в Microsoft.Windows.Controls.MessageBox.InitializeMessageBox(Window owner, String text, String caption, MessageBoxButton button, MessageBoxImage image, MessageBoxResult defaultResult) в Microsoft.Windows.Controls.MessageBox.ShowCore(Window owner, String messageText, String caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) в Microsoft.Windows.Controls.MessageBox.Show(Window owner, String messageText, String caption, MessageBoxButton button) в Microsoft.Windows.Controls.MessageBox.Show(Window owner, String messageText) в StockSharp.Hydra.App.Application_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e) в E:\Temporary\stocksharp-12366\Hydra\Hydra\App.xaml.cs:строка 12 в System.Windows.Threading.Dispatcher.CatchException(Exception e) в System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e) в System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler) в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) в System.Windows.Application.RunDispatcher(Object ignore) в System.Windows.Application.RunInternal(Window window) в System.Windows.Application.Run(Window window) в System.Windows.Application.Run() в StockSharp.Hydra.App.Main() в E:\Temporary\stocksharp-12366\Hydra\Hydra\obj\Debug\App.g.cs:строка 0

Alexander
Alexander

Видимо что-то не так исправили. app.config должен быть таким: http://stocksharp.codeplex.com/SourceControl/changeset/view/12332#110260

SoWar
SoWar

Alexander Mukhanchikov: Видимо что-то не так исправили. app.config должен быть таким: http://stocksharp.codeplex.com/SourceControl/changeset/view/12332#110260

Да, действительно раскомментировал не то, что нужно. Спасибо. Сейчас запускается. Однако в логе следующее сообщение:

Гидра 11:04:43.1814871 System.IO.FileNotFoundException: Невозможно загрузить файл или сборку "StockSharp.Smart, Version=4.0.7.0, Culture=neutral, PublicKeyToken=null" или один из зависимых от них компонентов. Не удается найти указанный файл. Имя файла: "StockSharp.Smart, Version=4.0.7.0, Culture=neutral, PublicKeyToken=null" в StockSharp.Hydra.Smart.SmartTraderSource.ApplySettings(MarketDataSourceSettings settings, Boolean isNew) в StockSharp.Hydra.Core.BaseMarketDataSource..ctor(HydraStorage storage, Guid id) в E:\Temporary\stocksharp-12373\Hydra\Core\BaseMarketDataSource.cs:строка 91 в StockSharp.Hydra.Core.TraderMarketDataSource..ctor(HydraStorage storage, Guid id) в E:\Temporary\stocksharp-12373\Hydra\Core\TraderMarketDataSource.cs:строка 22 в StockSharp.Hydra.Smart.SmartTraderSource..ctor(HydraStorage storage) в E:\Temporary\stocksharp-12373\Hydra\Plugins\Smart\SmartTraderSource.cs:строка 109 в (HydraStorage arg) в Ecng.Reflection.FastInvoker3.Ctor(A arg) в Ecng.Reflection.FastInvoker3.Ctor(Object arg) в Ecng.Reflection.ReflectionHelper.CreateInstance(ConstructorInfo ctor, Object arg) в Ecng.Reflection.ReflectionHelper.CreateInstance(Type type, Object arg) в Ecng.Reflection.ReflectionHelper.CreateInstance(Type type, Object arg) в StockSharp.Hydra.MainWindow.<.ctor>b__4(Type t) в E:\Temporary\stocksharp-12373\Hydra\Hydra\MainWindow.xaml.cs:строка 118 в System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() в System.Linq.Buffer1..ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) в StockSharp.Hydra.MainWindow..ctor() в E:\Temporary\stocksharp-12373\Hydra\Hydra\MainWindow.xaml.cs:строка 115

Предупреждение: регистрация привязки сборок выключена. Чтобы включить регистрацию ошибок привязки сборок, установите значение параметра реестра [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) в 1. Примечание. Регистрация ошибок привязки сборок может привести к некоторому снижению производительности. Чтобы отключить эту функцию, удалите параметр реестра [HKLM\Software\Microsoft\Fusion!EnableLog].

И в качестве источника смартком недоступен. Версия 12373, конфиг 12332.

Alexander
Alexander

А смартком стоит? Какой версии? Мы на 2.2 уже перешли, а вы? :)

SoWar
SoWar

Alexander Mukhanchikov: А смартком стоит? Какой версии? Мы на 2.2 уже перешли, а вы? :) :) Я сегодня последнюю с сайта установил. SmartCOM 2.2.79 от 25.11.2011. Служба запущена.

Alexander
Alexander

Тогда будет фикс в 4.0.8

SoWar
SoWar

Alexander Mukhanchikov: Тогда будет фикс в 4.0.8 Доброго дня. В 4.0.8 все заработало. Только в логах регулярно проскакивает ошибка: Smart 10:06:31.3600318 System.ArgumentOutOfRangeException: Неправильная цена котировки. Имя параметра: quotes Фактическое значение было 0. в #=qPMufK$bQEf5wQO5T68Cf64YZYLhtymrjjO91N$Srk8P7nbkcHWldt4r16rjz7pAz.#=qT0OMZdDqEQdH3G8dPpTs7GABa0TgzB34zyLG9VVkUv4=(List1 #=qm6NhDDcDhq3TOkXWf62y7Q==, Quote[] #=qrRIrDdMvDp3j3pSg1hBGIw==, #=qO2mb87It7f3IifeMGTXiUE_7PDdmht7FGAcYcs2KDh$Gr0RHqU$8LO6_uOveVkfR #=q81lmfkeK19FQfJepHU9bZA==, Boolean #=q0Szdv28QDt2SFQOaczcz3g==) в #=qPMufK$bQEf5wQO5T68Cf64YZYLhtymrjjO91N$Srk8P7nbkcHWldt4r16rjz7pAz.OnSave(List1 #=qmlY7Zi8Ho7fxV4lwIJtP0A==, IEnumerable1 #=qjtezu2eeOP53dgKa$67JyQ==, DateTime #=qwp4YBqLawCdY_NPyYyUPrA==, #=qO2mb87It7f3IifeMGTXiUE_7PDdmht7FGAcYcs2KDh$Gr0RHqU$8LO6_uOveVkfR #=qNMoXoAsyIpjexGa5A11Y$A==) в #=q0$W8aBwt_k$4EVtHJB$Utd9$Q1_TwC_dvvJpRN$1ANGqsTtgDKzb4OIx9uC8A3XD.#=qQS4bhea7nmg5xszO6uH6uA==(DateTime #=q9F7jvGwpsSrCUqsK97j6zw==, IEnumerable1 #=quwTGrDr84ABR5KTdRWw$qw==, Boolean #=qrqIqnrZRpu65GP5DJeMgHg==) в #=q0$W8aBwt_k$4EVtHJB$Utd9$Q1_TwC_dvvJpRN$1ANGqsTtgDKzb4OIx9uC8A3XD.Save(IEnumerable1 #=qSkRQMIvLqMBDjfH_HWQQtg==) в StockSharp.Hydra.Core.BaseMarketDataSource.SaveDepths(Security security, IEnumerable1 depths) в E:\Temporary\stocksharp-12411\Hydra\Core\BaseMarketDataSource.cs:строка 196 в StockSharp.Hydra.Core.BaseMarketDataSource.SaveDepths(IDictionary`2 allDepths) в E:\Temporary\stocksharp-12411\Hydra\Core\BaseMarketDataSource.cs:строка 185 в StockSharp.Hydra.Core.TraderMarketDataSource.Load() в E:\Temporary\stocksharp-12411\Hydra\Core\TraderMarketDataSource.cs:строка 69 в StockSharp.Hydra.Worker.<>c__DisplayClass13.<Download>b__10(IMarketDataSource source) в E:\Temporary\stocksharp-12411\Hydra\Hydra\Worker.cs:строка 158 Это смартком виноват?

Alexander
Alexander

А через SmartTrade нормально стаканы получаются, ошибок нет?

SoWar
SoWar

Alexander Mukhanchikov: А через SmartTrade нормально стаканы получаются, ошибок нет? ну откуда же мне знать? :) Наверняка там ошибки перехватываются. Смарттрейд работает. Бывают с ним проблемы в виде зависаний при реконнекте и прекращения обновлений то стакана, то графика, но на порядок реже, чем выскакивают эти ошибки в логе гидры.

Alexander
Alexander

SoWar:

Alexander Mukhanchikov: А через SmartTrade нормально стаканы получаются, ошибок нет? ну откуда же мне знать? :) Наверняка там ошибки перехватываются. Смарттрейд работает. Бывают с ним проблемы в виде зависаний при реконнекте и прекращения обновлений то стакана, то графика, но на порядок реже, чем выскакивают эти ошибки в логе гидры.

Я имел в виду SmartTrader. букву недописал :)

SoWar
SoWar

Alexander Mukhanchikov: Я имел в виду SmartTrader. букву недописал :) Смарттрейдер это что? :) SampleSmart стакан фьюча РТС отображает нормально, хотя мне кажется что обновление раз в секунду идет. Логов он вроде бы не ведет, а визуально все в порядке. Гидра еще один вид ошибки зафиксировала. Smart 16:39:57.7298024 System.ArgumentException: Лучший бид 140125 больше или равен лучшему офферу 140125. Имя параметра: depths в #=qPMufK$bQEf5wQO5T68Cf64YZYLhtymrjjO91N$Srk8P7nbkcHWldt4r16rjz7pAz.OnSave(List1 #=qmlY7Zi8Ho7fxV4lwIJtP0A==, IEnumerable1 #=qjtezu2eeOP53dgKa$67JyQ==, DateTime #=qwp4YBqLawCdY_NPyYyUPrA==, #=qO2mb87It7f3IifeMGTXiUE_7PDdmht7FGAcYcs2KDh$Gr0RHqU$8LO6_uOveVkfR #=qNMoXoAsyIpjexGa5A11Y$A==) в #=q0$W8aBwt_k$4EVtHJB$Utd9$Q1_TwC_dvvJpRN$1ANGqsTtgDKzb4OIx9uC8A3XD.#=qQS4bhea7nmg5xszO6uH6uA==(DateTime #=q9F7jvGwpsSrCUqsK97j6zw==, IEnumerable1 #=quwTGrDr84ABR5KTdRWw$qw==, Boolean #=qrqIqnrZRpu65GP5DJeMgHg==) в #=q0$W8aBwt_k$4EVtHJB$Utd9$Q1_TwC_dvvJpRN$1ANGqsTtgDKzb4OIx9uC8A3XD.Save(IEnumerable1 #=qSkRQMIvLqMBDjfH_HWQQtg==) в StockSharp.Hydra.Core.BaseMarketDataSource.SaveDepths(Security security, IEnumerable1 depths) в E:\Temporary\stocksharp-12411\Hydra\Core\BaseMarketDataSource.cs:строка 196 в StockSharp.Hydra.Core.BaseMarketDataSource.SaveDepths(IDictionary2 allDepths) в E:\Temporary\stocksharp-12411\Hydra\Core\BaseMarketDataSource.cs:строка 185 в StockSharp.Hydra.Core.TraderMarketDataSource.Load() в E:\Temporary\stocksharp-12411\Hydra\Core\TraderMarketDataSource.cs:строка 69 в StockSharp.Hydra.Worker.<>c__DisplayClass13.<Download>b__10(IMarketDataSource source) в E:\Temporary\stocksharp-12411\Hydra\Hydra\Worker.cs:строка 158

Mikhail Sukhov
Mikhail Sukhov

SoWar:

Alexander Mukhanchikov: Я имел в виду SmartTrader. букву недописал :) Смарттрейдер это что? :) SampleSmart стакан фьюча РТС отображает нормально, хотя мне кажется что обновление раз в секунду идет. Логов он вроде бы не ведет, а визуально все в порядке.

Попробуйте стаканы проверить на правильность через событие ITrader.QuotesChanged. Судя по всему они неправильно транслируются со Смарта. Кстати, вы новые смарт ком установили?

SoWar
SoWar

При попытке просмотра данных стакана Гидра завершает работу из-за отсутствия памяти:

Гидра 23:07:06.6662856 System.OutOfMemoryException: Выдано исключение типа "System.OutOfMemoryException". в System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters) в System.Windows.Window.EnsureHiddenWindow() в System.Windows.Window.SetTaskbarStatus() в System.Windows.Window.CreateAllStyle() в System.Windows.Window.CreateSourceWindow(Boolean duringShow) в System.Windows.Window.CreateSourceWindowDuringShow() в System.Windows.Window.SafeCreateWindowDuringShow() в System.Windows.Window.ShowHelper(Object booleanBox) в System.Windows.Window.Show() в System.Windows.Window.ShowDialog() в Microsoft.Windows.Controls.MessageBox.Show() в Microsoft.Windows.Controls.MessageBox.ShowCore(Window owner, String messageText, String caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) в Microsoft.Windows.Controls.MessageBox.Show(String messageText, String caption, MessageBoxButton button) в Microsoft.Windows.Controls.MessageBox.Show(String messageText) в StockSharp.Hydra.App.Application_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e) в E:\Temporary\stocksharp-12411\Hydra\Hydra\App.xaml.cs:строка 12 в System.Windows.Threading.Dispatcher.CatchException(Exception e) в System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e) в System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler) в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) в System.Windows.Application.RunDispatcher(Object ignore) в System.Windows.Application.RunInternal(Window window) в System.Windows.Application.Run(Window window) в System.Windows.Application.Run() в StockSharp.Hydra.App.Main() в E:\Temporary\stocksharp-12411\Hydra\Hydra\obj\Debug\App.g.cs:строка 0 Хотя памяти еще полтора гигабайта как минимум. Суммарно оперативки 4Гб. В диспетчере задач винды при работе гидры начинает съедаться память, отображаемая в разделе "физическая память/свободно".

Alexander
Alexander

При попытке просмотра данных стакана Гидра завершает работу из-за отсутствия памяти:

Гидра 23:07:06.6662856 System.OutOfMemoryException: Выдано исключение типа "System.OutOfMemoryException". в System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters) в System.Windows.Window.EnsureHiddenWindow() в System.Windows.Window.SetTaskbarStatus() в System.Windows.Window.CreateAllStyle() в System.Windows.Window.CreateSourceWindow(Boolean duringShow) в System.Windows.Window.CreateSourceWindowDuringShow() в System.Windows.Window.SafeCreateWindowDuringShow() в System.Windows.Window.ShowHelper(Object booleanBox) в System.Windows.Window.Show() в System.Windows.Window.ShowDialog() в Microsoft.Windows.Controls.MessageBox.Show() в Microsoft.Windows.Controls.MessageBox.ShowCore(Window owner, String messageText, String caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) в Microsoft.Windows.Controls.MessageBox.Show(String messageText, String caption, MessageBoxButton button) в Microsoft.Windows.Controls.MessageBox.Show(String messageText) в StockSharp.Hydra.App.Application_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e) в E:\Temporary\stocksharp-12411\Hydra\Hydra\App.xaml.cs:строка 12 в System.Windows.Threading.Dispatcher.CatchException(Exception e) в System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e) в System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler) в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) в System.Windows.Application.RunDispatcher(Object ignore) в System.Windows.Application.RunInternal(Window window) в System.Windows.Application.Run(Window window) в System.Windows.Application.Run() в StockSharp.Hydra.App.Main() в E:\Temporary\stocksharp-12411\Hydra\Hydra\obj\Debug\App.g.cs:строка 0 Хотя памяти еще полтора гигабайта как минимум. Суммарно оперативки 4Гб. В диспетчере задач винды при работе гидры начинает съедаться память, отображаемая в разделе "физическая память/свободно".

Так это он у вас какие-то MessageBox с ошибками хочет показать. Не показывает?

Поставьте брэйк сюда: E:\Temporary\stocksharp-12411\Hydra\Hydra\App.xaml.cs:строка 12 и посмотрите

  1. почему не кидает окошко
  2. что за exception приходит
Mikhail Sukhov
Mikhail Sukhov

SoWar: При попытке просмотра данных стакана Гидра завершает работу из-за отсутствия памяти:

Если мы говорим про Ри, то за день набегает около 2.5 млн стаканов. Это почти гигабайт. Не уверен, что Гидра сможет нормально обрабатывать такие объемы. Вы за какой период пытаетесь загрузить стаканы?

SoWar
SoWar

Alexander Mukhanchikov: Так это он у вас какие-то MessageBox с ошибками хочет показать. Не показывает?

Поставьте брэйк сюда: E:\Temporary\stocksharp-12411\Hydra\Hydra\App.xaml.cs:строка 12 и посмотрите

  1. почему не кидает окошко
  2. что за exception приходит

Неточно описал. Окошко кидает и завершает работу. Ошибка выдается та же, что и в логе: недостаточно памяти.

Mikhail Sukhov: Если мы говорим про Ри, то за день набегает около 2.5 млн стаканов. Это почти гигабайт. Не уверен, что Гидра сможет нормально обрабатывать такие объемы. Вы за какой период пытаетесь загрузить стаканы?

Да, про ри. Я выставил 1 день с 0 до 12 часов. Т.е. по идее всего два часа данных по стаканам. Гиг съелся за полминуты и выпало это сообщение. Время, как я понял, задается в формате 24 часов чч:мм:сс.

Mikhail Sukhov: Попробуйте стаканы проверить на правильность через событие ITrader.QuotesChanged. Судя по всему они неправильно транслируются со Смарта. Кстати, вы новые смарт ком установили?

Смартком последний. Проверку события сделать попробую, но повторюсь, программер я слабый.

Mikhail Sukhov
Mikhail Sukhov

SoWar: Смартком последний. Проверку события сделать попробую, но повторюсь, программер я слабый.

А Вам зачем стаканы?

SoWar
SoWar

Mikhail Sukhov: А Вам зачем стаканы?

Я хочу их выгрузить для анализа в стороннем ПО. Хотелось бы иметь несколько дней истории без ошибок.

Mikhail Sukhov
Mikhail Sukhov

SoWar:

Mikhail Sukhov: А Вам зачем стаканы?

Я хочу их выгрузить для анализа в стороннем ПО. Хотелось бы иметь несколько дней истории без ошибок.

Сколько нужно подождать, чтобы получить ошибку?

SoWar
SoWar

Mikhail Sukhov: Сколько нужно подождать, чтобы получить ошибку?

Ошибки случаются с интервалами от 1-ой до 10 мин. Среднее где-то около 3-4 мин.

AlekZ
AlekZ

Добрый день. Помогите настроить работу программы Hydra c БД SQL Server 2008 Express (первый раз без исправления конфига приложение запустилось)

БД скриптом создал, пользователем trading через SQL Manadgment Studio заходит нормально. Конфиг программы исправил в соответсвии с предложением в этой ветке форума: http://stocksharp.codeplex.com/SourceControl/changeset/view/12332#110260

При запуске приложения выдается сообщение об ошибке:

Гидра 09:13:01.1601322 System.TypeInitializationException: Инициализатор типа "Ecng.Configuration.ConfigManager" выдал исключение. ---> System.IO.FileLoadException: Данное имя сборки или база кода недействительны. (Исключение из HRESULT: 0x80131047) в System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) в System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) в System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) в System.Type.GetType(String typeName) в Microsoft.Practices.Unity.Configuration.ConfigurationHelpers.TypeResolverImpl.SearchAssemblies(String typeNameOrAlias) в Microsoft.Practices.Unity.Configuration.ConfigurationHelpers.TypeResolverImpl.ResolveTypeThroughSearch(String typeNameOrAlias) в Microsoft.Practices.Unity.Configuration.ConfigurationHelpers.TypeResolverImpl.ResolveTypeInternal(String typeNameOrAlias) в Microsoft.Practices.Unity.Configuration.ConfigurationHelpers.TypeResolverImpl.ResolveType(String typeNameOrAlias, Boolean throwIfResolveFails) в Microsoft.Practices.Unity.Configuration.DependencyElement.GetInjectionParameterValue(IUnityContainer container, Type parameterType) в Microsoft.Practices.Unity.Configuration.PropertyElement.GetInjectionMembers(IUnityContainer container, Type fromType, Type toType, String name) в Microsoft.Practices.Unity.Configuration.RegisterElement.<>c__DisplayClass1.<ConfigureContainer>b__0(InjectionMemberElement m) в System.Linq.Enumerable.<SelectManyIterator>d__142.MoveNext() в System.Linq.Buffer1..ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) в Microsoft.Practices.Unity.Configuration.RegisterElement.ConfigureContainer(IUnityContainer container) в Microsoft.Practices.Unity.Configuration.ContainerElement.<>c__DisplayClass1.<ConfigureContainer>b__0(ContainerConfiguringElement element) в Microsoft.Practices.ObjectBuilder2.EnumerableExtensions.ForEach[TItem](IEnumerable1 sequence, Action1 action) в Microsoft.Practices.Unity.Configuration.ContainerElement.ConfigureContainer(IUnityContainer container) в Microsoft.Practices.Unity.Configuration.UnityConfigurationSection.Configure(IUnityContainer container, String configuredContainerName) в Microsoft.Practices.Unity.Configuration.UnityContainerExtensions.LoadConfiguration(IUnityContainer container, UnityConfigurationSection section, String containerName) в Microsoft.Practices.Unity.Configuration.UnityContainerExtensions.LoadConfiguration(IUnityContainer container, UnityConfigurationSection section) в Ecng.Configuration.ConfigManager..cctor() --- Конец трассировки внутреннего стека исключений --- в Ecng.Configuration.ConfigManager.get_ServiceLocator() в StockSharp.Hydra.MainWindow..ctor() в F:\Sources\StockSharpReleases\StockSharp_4.0.14\Hydra\Hydra\MainWindow.xaml.cs:строка 72

Mikhail Sukhov
Mikhail Sukhov

Конфиг правили?

AlekZ
AlekZ

Да - конфиг программы исправил, точнее заменил на файл, который вы в этой ветке форума предлагали попробовать: http://stocksharp.codeplex.com/SourceControl/changeset/view/12332#110260

Mikhail Sukhov
Mikhail Sukhov

AlekZ: Да - конфиг программы исправил, точнее заменил на файл, который вы в этой ветке форума предлагали попробовать: http://stocksharp.codeplex.com/SourceControl/changeset/view/12332#110260

Как в итоге он сейчас у вас выглядит?

AlekZ
AlekZ
<?xml version="1.0"?>
<configuration>
	<configSections>
		<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration"/>
		<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
			<section name="StockSharp.Hydra.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
		</sectionGroup>
	</configSections>

	<startup>
		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
	</startup>

	<connectionStrings>
		<!-- <add name="SqlServerConStr" connectionString="Server=(local);Database=Trading;User ID=trading;Password=trading;" providerName=""/>-->
		<add name="SqlServerConStr" connectionString="Data Source=USER-VM\SQLEXPRESS;Initial Catalog=Trading;Persist Security Info=True;User ID=trading;Password=trading;" providerName=""/>		
		<add name="SQLiteConStr" connectionString="Data Source=%Documents%\StockSharp\Hydra\StockSharp.db" providerName="" />
	</connectionStrings>

	<unity>
		<containers>
			<container>
				<types>
					<register type="Ecng.Serialization.IStorage, Ecng.Serialization" mapTo="Ecng.Data.HierarchicalDatabase, Ecng.Data">
						<constructor>
							<param name="name" value="Hydra Database"/>
							<param name="connectionString">
								<!-- По умолчанию используется SQLite -->
								<!--<value value="SQLiteConStr" typeConverter="Ecng.Configuration.ConnectionSettingsTypeConverter, Ecng.Configuration"/>-->
								<value value="SqlServerConStr" typeConverter="Ecng.Configuration.ConnectionSettingsTypeConverter, Ecng.Configuration"/>
							</param>
						</constructor>
						
						<!-- SQLite не поддерживает хранимые процедуры -->
						<!--<property name="CommandType" value="StoredProcedure" />-->

						<!-- Для других баз данных провайдер необходимо поменять -->
						<!--<property name="Provider">
							<dependency type="Ecng.Data.Providers.SQLiteDatabaseProvider, Ecng.Data.Providers" />
						</property>-->
						
						
						<lifetime type="singleton" />
					</register>

					<register type="StockSharp.Hydra.Core.HydraStorage, StockSharp.Hydra.Core" mapTo="StockSharp.Hydra.Core.HydraStorage, StockSharp.Hydra.Core">
						<constructor>
							<param name="storage">
								<dependency type="Ecng.Serialization.IStorage, Ecng.Serialization"/>
							</param>
						</constructor>
						
						<!-- Путь, по которому будут записываться маркет-данные -->
						<!--<property name="BasePath" propertyType="System.String" value="" />-->

						<!--<property name="UseUpdateOnly" value="true"/>-->
						
						<lifetime type="singleton" />
					</register>
				</types>
			</container>
		</containers>
	</unity>
	<applicationSettings>
		<StockSharp.Hydra.Properties.Settings>
			<setting name="AutoStart" serializeAs="String">
				<value>False</value>
			</setting>
		</StockSharp.Hydra.Properties.Settings>
	</applicationSettings>
</configuration>
Mikhail Sukhov
Mikhail Sukhov

Подсветку кода нужно делать. Ничего не видно. Гидра какой версии?

Alexander
Alexander

Mikhail Sukhov: Подсветку кода нужно делать.

Подправил его сообщение, так лучше 😎

Mikhail Sukhov
Mikhail Sukhov

Mikhail Sukhov: Подсветку кода нужно делать. Ничего не видно. Гидра какой версии?

SQLServerDatabaseProvider - вот это откуда взяли?

AlekZ
AlekZ

Mikhail Sukhov: Подсветку кода нужно делать. Ничего не видно. Гидра какой версии? Запустить приложение удалось:

  1. обновил до версии 4.0.15
  2. исправил конфиг #71
  • поменял там строку подключения к серверу.
  1. добавил пользователю trading роль db_datawriter, т.к. до того было сообщение об ошибке (Запрещено разрешение "INSERT" на объект "Exchange" базы данных "Trading", схемы "dbo").
freelancer
freelancer

Первый раз запустил Гидру. Включил источник РТС. Ничего не запускается. Пишет что ни один источник не включен. Что я сделал не так ?

AlekZ
AlekZ

Настроить работу программы Hydra c БД SQL Server 2008 Express удалось.

Попробовал программу в работе с историей Finam (данные загружает, в текстовые файлики пишет) и возник вопрос: умеет ли Гидра сохранять сами исторические данные в БД?

По описанию из документации Stock#.Гидра.Установка и работа Stock#.Хранение данных.База данных сложилось впечатление что умеет, но поискал в табличках базы Trading те самые данные что загружены в файлах и не нашел (ничего кроме Security и MarketDataSourceSettings).

Mikhail Sukhov
Mikhail Sukhov

AlekZ: умеет ли Гидра сохранять сами исторические данные в БД?

Если ее сами научите. Год назад умела, но то была ошибка проектирования.

Hydra работает НО... Скажите пожалуйста в связи с чем возможно такое - при запуске гидры постоянно вылетает исключение в логах :

Гидра 01:29:38.0465226 System.Reflection.TargetInvocationException: Адресат вызова создал исключение. ---> System.IO.FileNotFoundException: Невозможно загрузить файл или сборку "StockSharp.Smart, Version=4.0.14.0, Culture=neutral, PublicKeyToken=null" или один из зависимых от них компонентов. Не удается найти указанный файл. в StockSharp.Hydra.Smart.SmartTraderSource.ApplySettings(MarketDataSourceSettings settings, Boolean isNew) в StockSharp.Hydra.Core.BaseMarketDataSource..ctor(HydraStorage storage, ISecurityStorage securityStorage, Guid id) в D:\work\Economic\S#\StockSharp_4.0.14_Sources\Hydra\Core\BaseMarketDataSource.cs:строка 103 в StockSharp.Hydra.Core.TraderMarketDataSource..ctor(HydraStorage storage, ISecurityStorage securityStorage, Guid id) в D:\work\Economic\S#\StockSharp_4.0.14_Sources\Hydra\Core\TraderMarketDataSource.cs:строка 24 в StockSharp.Hydra.Smart.SmartTraderSource..ctor(HydraStorage storage, ISecurityStorage securityStorage) в D:\work\Economic\S#\StockSharp_4.0.14_Sources\Hydra\Plugins\Smart\SmartTraderSource.cs:строка 110 --- Конец трассировки внутреннего стека исключений --- в System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType) в System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) в System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) в Ecng.Common.TypeHelper.CreateInstance(Type type, Object[] args) в StockSharp.Hydra.MainWindow.<.ctor>b__4(Type t) в D:\work\Economic\S#\TradeMaxProject\Hydra\Hydra\MainWindow.xaml.cs:строка 121 в System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() в System.Linq.Buffer1..ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) в StockSharp.Hydra.MainWindow..ctor() в D:\work\Economic\S#\TradeMaxProject\Hydra\Hydra\MainWindow.xaml.cs:строка 118

Mikhail Sukhov
Mikhail Sukhov

Гидра скомпилирована под x64, а Смарта такого нет.

Перекомпилировал проект под x86, все ok.

Mikhail Sukhov
Mikhail Sukhov

Максим Пыж: Перекомпилировал проект под x86, все ok.

А зачем? Вам СмартКом нужен?

Нет.. я уже его просто удалил из проекта)) Михаил просьба - посмотрите тему Загрузка исторических данных

quant
quant

Добрый день!

Не подскажете как исправить ошибку загрузки данных с RTS - все время пишет в логе сообщение (Версия гидры 4.0.10):


RTS 16:31:03.5618910 Старт с 04.01.2003.
RTS 16:31:04.1689257 System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
  в Ecng.Interop.ExcelExporter.GetCell(Int32 col, Int32 row)
  в #=qa_4zGoLcsro_feFbb0XM910Tz0$AyHj1NOuwU0WY$gn7pThDKcpswoOHkXGAdRjW.#=qGPlccgPMLtztLWxYUdI0fg==(IDictionary`2 #=qymJnS7Fs_ydQJ8qw3v5r9g==, String #=q0Hg2LTktGb64Lr_8Z4yS4w==)
  в #=qa_4zGoLcsro_feFbb0XM910Tz0$AyHj1NOuwU0WY$gn7pThDKcpswoOHkXGAdRjW.#=q_S70pGGAyDxdIPbPv2vDVg==(FTP_Client #=qmJipntlmp0$IYiGBAIYlLA==, DateTime #=qaxFI2zAyQoSAyaxJOGMRTw==)
  в #=qOb4$i5TJKKFIUXpD2aizFfFC21rZSRfQbj4qIkS$2Vp90XUCPt95AxcH1Pv_Qy5E.#=qDAFAt9aydcbPdVPxTSSU5w==(IDictionary`2 #=qYE61LhPNYiUDc3eJcH45XQ==, FTP_Client #=q$QDBHjtraTqN06$xfUV3iA==, DateTime #=q3Yz9iti0w1ecBgW7lsTIjg==)
  в StockSharp.Algo.History.Rts.RtsHistorySource.#=q22QGYyzdv$5Xb104UW$yssS6K_gwaNFDMf$j1$T6qxc=.#=qEbFklHRvGHrprgvfNs5YPFCe2JdlFVvUwcC05VDpiPU=()
  в Ecng.Common.Converter.<>c__DisplayClassa.<DoInCulture>b__9()
  в Ecng.Common.Converter.DoInCulture[T](CultureInfo cultureInfo, Func`1 func)
  в Ecng.Common.Converter.DoInCulture(CultureInfo cultureInfo, Action action)
  в StockSharp.Algo.History.Rts.RtsHistorySource.LoadTrades(DateTime date, IDictionary`2 trades)
  в StockSharp.Hydra.Rts.RtsSource.Load() в d:\StockSharpTest\Hydra\Plugins\Rts\RtsSource.cs:строка 143
  в StockSharp.Hydra.Worker.<>c__DisplayClass13.<Download>b__10(IMarketDataSource source) в d:\StockSharpTest\Hydra\Hydra\Worker.cs:строка 187
RTS 16:31:04.1689257 Останавливается.
RTS 16:31:04.1689257 Остановлен.

Alexander
Alexander

4.0.10 - старая версия. Свежая - 4.0.17

quant
quant
quant

Спасибо, за оперативный ответ!

Сейчас заработала закачка с ртс, только по контракту Si (SiH, SiU итд) часто выдает ошибку о нулевом шаге цены. Пишет в логе:

RTS 23:28:48.2585097 System.ArgumentException: Инструмент SiU5@RTS имеет нулевой шаг цены.
Имя параметра: security
   в #=qojSGdOipNk5Y9rHwuGSMNtKQzbMsE6oK_eDCoPVVWeToqwppjflWC77t7WTUovqZ..ctor(Security #=qx0phUuZyzv2WsgFqoFJxUQ==, String #=q503ry1483aTa7tq54_afGA==, String #=qR1GMu1TrD01_BVpGbdOFnA==, Int32 #=q5_9upqKZ9UMn$7Pn4oAiJw==, Func`2 #=q0MomEuzA4xtlaXcBGBnucQ==, Func`2 #=qPMl9A2Ix7wdSZB8yPkiijg==, Func`2 #=qFPEYi6$rDpPqsa$ZGK9RxA==)
   в #=qmI5xvEKTIMXM0WPu1fTMNAPN1tpl6DctEeisTJ$kuPI7HTaPLsT7xf_IpfzjnM$d..ctor(Security #=qolDqi37ZQ5N6icpRFNa9Pg==, String #=qmmjpzKInj_QAhXQ$U0aqxA==)
   в StockSharp.Algo.Storages.TradingStorage.#=qCbF9R$gTu4uxC7RvdZ4kQqmySIWX1UMlAD3ohEhbyv8=(Tuple`2 #=qIY$TwMnUslZHm_y8j2bgyA==)
   в Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler)
   в StockSharp.Algo.Storages.TradingStorage.GetTradeStorage(Security security, String basePath)
   в StockSharp.Hydra.Core.BaseMarketDataSource.SaveTrades(Security security, IEnumerable`1 trades) в d:\StockSharpTest\Hydra\Core\BaseMarketDataSource.cs:строка 185
   в StockSharp.Hydra.Core.BaseMarketDataSource.SaveTrades(IDictionary`2 allTrades) в d:\StockSharpTest\Hydra\Core\BaseMarketDataSource.cs:строка 174
   в StockSharp.Hydra.Rts.RtsSource.Load() в d:\StockSharpTest\Hydra\Plugins\Rts\RtsSource.cs:строка 145
   в StockSharp.Hydra.Worker.<>c__DisplayClass13.<Download>b__10(IMarketDataSource source) в d:\StockSharpTest\Hydra\Hydra\Worker.cs:строка 187
RTS 23:28:48.2605098 Останавливается.
RTS 23:28:48.2605098 Остановлен.

Не подскажете как это исправить?

Mikhail Sukhov
Mikhail Sukhov

quant: Не подскажете как это исправить?

С какого года закачка началась?

quant
quant

Mikhail Sukhov: С какого года закачка началась?

Дата начала с 04 янв 2003. Была проблема с контрактом SiH3 - я поставил шаг цены руками - продолжило скачиваться без ошибок, теперь споткнулось на SiM5.

Mikhail Sukhov
Mikhail Sukhov

quant:

Mikhail Sukhov: С какого года закачка началась?

Дата начала с 04 янв 2003. Была проблема с контрактом SiH3 - я поставил шаг цены руками - продолжило скачиваться без ошибок, теперь споткнулось на SiM5.

А параллельно еще какая-то была закачка (я имею ввиду не только с РТС)?

quant
quant

Mikhail Sukhov:

quant:

Mikhail Sukhov: С какого года закачка началась?

Дата начала с 04 янв 2003. Была проблема с контрактом SiH3 - я поставил шаг цены руками - продолжило скачиваться без ошибок, теперь споткнулось на SiM5.

А параллельно еще какая-то была закачка (я имею ввиду не только с РТС)?

Нет, активный источник только РТС.

Mikhail Sukhov
Mikhail Sukhov

quant: Нет, активный источник только РТС.

Тоесть, до этого ничем не качали? Окей. А для инструментов делали Обновить?

quant
quant

Mikhail Sukhov: Тоесть, до этого ничем не качали? Окей. А для инструментов делали Обновить?

До этого качал пару инструментов с финама (акции ММВБ), но потом отключил и включил только ртс. При нажатии кнопки обновить - выскакивает сообщение, что не выбран ни один источник.

Сейчас выскочило такое же сообщение про минимальный шаг цены равен нулю для GZZ9 при загрузке данных для 15.12.2006🤨

Mikhail Sukhov
Mikhail Sukhov

quant: Сейчас выскочило такое же сообщение про минимальный шаг цены равен нулю для GZZ9 при загрузке данных для 15.12.2006🤨

Понятно. Инструменты РТС-ные без информации о шаге цены скачены с Финам. Соберите Гидру из дев ветки. Возможно, что ошибка исправлена.

quant
quant

Mikhail Sukhov: Понятно. Инструменты РТС-ные без информации о шаге цены скачены с Финам. Соберите Гидру из дев ветки. Возможно, что ошибка исправлена.

Скомпилировал гидру из папки дев 13837, в логе при попытке загрузки теперь пишет:

14:18:53.9059415 RTS Старт с 15.12.2006.
14:18:55.4000270 RTS Сохранение сделок для ESZ6@RTS.
14:18:55.4000270 RTS Для ESZ6@RTS загружено 116 сделок.
14:18:55.4180280 RTS System.Data.SqlClient.SqlException (0x80131904): The parameterized query '(@BestAskOrderDirection int,@BestAskPrice decimal(29,0),@BestAsk' expects the parameter '@BestAskOrderDirection', which was not supplied.
  в System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
  в System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
  в System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
  в System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
  в System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
  в System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
  в System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
  в System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
  в Ecng.Data.DatabaseCommand.<>c__DisplayClass4`1.<Execute>b__1(DbConnection connection)
  в Ecng.Data.Database.GetConnection(Action`1 action)
  в Ecng.Data.DatabaseCommand.Execute[TResult](IEnumerable`1 input, Func`2 handler)
  в Ecng.Data.Database.Execute(DatabaseCommand command, SerializationItemCollection source, Boolean needRetVal)
  в Ecng.Data.Database.<>c__DisplayClass11`1.<Update>b__10()
  в Ecng.Data.Database.Update[TEntity](TEntity entity, FieldList keyFields, FieldList valueFields)
  в Ecng.Data.HierarchicalPageLoadList`1.OnUpdate(TEntity entity)
  в Ecng.Serialization.RelationManyList`1.Update(TEntity entity)
  в StockSharp.Hydra.MainWindow.OnSourceDataLoaded(IMarketDataSource source, Security security, Type dataType, Int32 count) в d:\StockSharpTest\13837\Hydra\Hydra\MainWindow.xaml.cs:строка 187
  в StockSharp.Hydra.MainWindow.<>c__DisplayClassa.<.ctor>b__6(Security sec, Type t, Int32 c) в d:\StockSharpTest\13837\Hydra\Hydra\MainWindow.xaml.cs:строка 150
  в StockSharp.Hydra.Core.BaseMarketDataSource.SaveTrades(Security security, IEnumerable`1 trades) в d:\StockSharpTest\13837\Hydra\Core\BaseMarketDataSource.cs:строка 189
  в StockSharp.Hydra.Core.BaseMarketDataSource.SaveTrades(IDictionary`2 allTrades) в d:\StockSharpTest\13837\Hydra\Core\BaseMarketDataSource.cs:строка 175
  в StockSharp.Hydra.Rts.RtsSource.Load() в d:\StockSharpTest\13837\Hydra\Plugins\Rts\RtsSource.cs:строка 126
  в StockSharp.Hydra.Worker.<>c__DisplayClass13.<Download>b__10(IMarketDataSource source) в d:\StockSharpTest\13837\Hydra\Hydra\Worker.cs:строка 187
14:18:55.4200281 RTS Останавливается.
14:18:55.4210282 RTS Остановлен.
Mikhail Sukhov
Mikhail Sukhov

quant: ...

Sql Server? Схема в БД совпадает с той, что в SQLite-е? Я давно скрипт не обновлял.

quant
quant

Mikhail Sukhov: Sql Server? Схема в БД совпадает с той, что в SQLite-е? Я давно скрипт не обновлял.

Да, SQL Server 2008R2 , - просмотрел колонки таблиц для SQL Server и SQLite - все вроде совпадает. С SQLite качает все без ошибок как для версии 4.0.17, так и для 13837. Сейчас использую SQLite, поэтому вопрос наверно можно снять, но готов дальше потестировать.

rif
rif

Здравствуйте,

я столкнулся со следующей проблемой - если в конфиге Гидры указать <property name="CommandType" value="StoredProcedure" />, то в процессе работы вылетают исключения типа:

System.InvalidOperationException: The stored procedure 'Security_ReadById' doesn't exist. или System.InvalidOperationException: The stored procedure 'MarketDataSourceSettings_Create' doesn't exist.

Использую MS SQL Server, Hydra 4.0.18

Может кто-нибудь подскажет где копать?

Mikhail Sukhov
Mikhail Sukhov

rif: Использую MS SQL Server, Hydra 4.0.18

Может кто-нибудь подскажет где копать?

Видимо скрипт неправильно применился, и права доступа не назначились... Зачем вам MSSQL, если вы его плохо знаете? Используйте SQLite.