Looking for a trader with a trading system. I am a programmer - page 8

 

Do you need Excel?

quik (odbc) - sql - mql

 
Mihail Marchukajtes:
Well, I kind of fixed the environment. Everything is broadcasting now. Let's get on with solving the main issue. Recording the history of cell changes during the broadcast. I saw another possibility of translation via ODBC in Quicksilver. What is this thing? What it is? :-)

ODBC is a unified database interface, of sorts.

It works more or less if you use MSSQL (who would doubt it) and (formerly) Oracle as your database. With the others, with its whistles.

MS Excel and MS Access should work. I have not checked, but according to corporate logic they should

They only need to understand how they are addressed through ODBC

---

if the database itself does not automatically identify itself as a source/receiver, then you have to administer in the wilds of Windows to adjust ODBC and rights to it

 
Aleksei Stepanenko:

Do you need Excel?

quik (odbc) - sql - mql

I think it would be cool to get an indicator in MKUL which would plot curvature history, volatility at central strike, and tangent angle and voila our market, do you think it would be too complicated? Just get the data from the options board and then calculate the parameters...

 
Aleksei Stepanenko:

Do you need Excel?

quik (odbc) - sql - mql

Alexey, do you happen to know if there are similar precedents for solving this issue. Maybe someone has already worked on it or maybe there's a ready-made solution? The question is about sending data directly to MQL....

 

No, I don't know any ready-made solution. I used to connect to the SQL site directly via ODBC a long time ago. Doesn't seem to be difficult.

Example is in 1C language, so sorry.

Connection:

Функция СоединитьсяССервером()
        еТекст="DRIVER={"+Драйвер+"}; SERVER="+Сервер+";"+"DATABASE="+БазаДанных+";"
                        +"UID="+ПользовательSQL+"; PASSWORD="+ПарольSQL+"; OPTION=3; STMT=SET CHARACTER SET CP1251";
        еСоединение=Новый COMОбъект("ADODB.Connection");
        еСоединение.ConnectionTimeOut=30;
        Для еИтератор=1 По 3 Цикл
                Попытка
                        еСоединение.Open(еТекст);
                        Прервать;
                Исключение
                    Сообщить("Невозможно установить соединение с базой данных SQL! " + ОписаниеОшибки());
                        еСоединение=-1;
                КонецПопытки;
        КонецЦикла;
        Возврат(еСоединение);
КонецФункции

Getting table contents:

Функция ПолучитьТаблицуКатегорийСайта(еСоединение, еПрефикс)
        еТекстЗапроса="
                |SELECT 
                |       `category_id`,
                |       `category_image`,
                |       `category_parent_id`,
                |       `category_publish`,
                |       `category_template`,
                |       `ordering`,
                |       `category_add_date`,
                |       `products_page`,
                |       `products_row`,
                |       `access`,
                |       `name_en-GB`,
                |       `alias_en-GB`,
                |       `short_description_en-GB`,
                |       `description_en-GB`,
                |       `meta_title_en-GB`,
                |       `meta_description_en-GB`,
                |       `meta_keyword_en-GB`,
                |       `name_ru-RU`,
                |       `alias_ru-RU`,
                |       `short_description_ru-RU`,
                |       `description_ru-RU`,
                |       `meta_title_ru-RU`,
                |       `meta_description_ru-RU`,
                |       `meta_keyword_ru-RU`
                |FROM 
                |       `"+еПрефикс+"jshopping_categories`
                |";
        еТаблица=Неопределено;
        Попытка
                еНаборЗаписей=Новый COMОбъект("ADODB.Recordset");
                еНаборЗаписей.Open(еТекстЗапроса,еСоединение,1);
                еТаблица=ПолучитьТаблицуИзОтветаНаЗапрос(еНаборЗаписей);
                еНаборЗаписей.Close();
        Исключение
            Сообщить("Составлен неправильный текст запроса к базе данных SQL! " + ОписаниеОшибки());
        КонецПопытки;   
        Возврат(еТаблица);      
КонецФункции

Retrieve information from query response:

Функция ПолучитьТаблицуИзОтветаНаЗапрос(еОтветНаЗапрос)
        Если еОтветНаЗапрос.EOF Тогда Возврат(-1); КонецЕсли;
        еПоследняяКолонка=еОтветНаЗапрос.Fields.Count()-1;
        еТаблица=Новый ТаблицаЗначений; 
        Для еИтератор=0 По еПоследняяКолонка Цикл
                еКолонка=еОтветНаЗапрос.Fields(еИтератор);
                еТипы=Новый Массив;
                еТипы.Добавить(ТипЗнч(еКолонка.Value));
                еТаблица.Колонки.Добавить(СтрЗаменить(еКолонка.Name,"-","_"), Новый ОписаниеТипов(еТипы));
        КонецЦикла;
        Пока Не еОтветНаЗапрос.EOF Цикл
                еСтрока=еТаблица.Добавить();
                Для еИтератор=0 По еПоследняяКолонка Цикл
                        еКолонка=еОтветНаЗапрос.Fields(еИтератор);
                        еСтрока[еИтератор]=еКолонка.Value;
                КонецЦикла;
                еОтветНаЗапрос.MoveNext();
        КонецЦикла;
    Возврат(еТаблица);     
КонецФункции
 
Aleksei Stepanenko:

No, I don't know any ready-made solution. I've been connecting to the SQL site directly via ODBC for a long time. Doesn't seem to be difficult.

Example is in 1C language, so sorry.

Connection:

Getting table contents:

Retrieving information from the response to the query:

Did you write this yourself? Or an example from a textbook

passing acquaintance with 1C says that as an ERP system it is the best, you could use it. To quickly and easily merge into a common database and make related reports.

But it is nailed to the accounting department (their configuration), and you can't use it without them :-(

 
I myself have written, was the idea of a bunch of 1C and Joomla. But the idea of an online shop has so far hung in the air among other crazy ideas


Here it is important to note that direct SQL queries to the site's database can be hacked, so SSH protection is needed. But this does not apply to Mikhail's task.

Regarding accounting, this is one of the configurations. There are many configurations for different types of businesses. It is also possible to modify these configurations to fit your needs. Or write all the logic yourself (but such costs are unnecessary). You can do data exchange between configurations Accounting and ERP for example.

Maxim, or I do not understand the question?

 
Aleksei Stepanenko:
I myself have written, was the idea of a bunch of 1C and Joomla. But the idea of an online shop is still hanging in the air among other crazy ideas


Here it is important to note that direct SQL queries to the site's database can be hacked, so SSH protection is needed. But this does not apply to Mikhail's task.

Regarding accounting, this is one of the configurations. There are many configurations for different types of businesses. It is also possible to modify these configurations to fit your needs. Or write all the logic yourself (but such costs are unnecessary).

Yeah... I'm not sure how to figure it out with half a litre :-( Thanks for the reply, I'll get specialists involved.....
 
Aleksei Stepanenko:
Sam wrote, was the idea of a bunch of 1C and Joomla. But the idea of online shop still hangs in the air among other crazy ideas


Here it is important to note that direct SQL querying of the site database is hackable, so SSH protection is needed. But this does not apply to Mikhail's task.

Regarding accounting, this is one of the configurations. There are many configurations for different types of businesses. It is also possible to modify these configurations to fit your needs. Or write all the logic yourself (but such costs are unnecessary). You can do data exchange between configurations Accounting and ERP for example.

Maxim, or I do not understand the question?

the question actually was not ... was more of a note

1C without a configuration to (something out there) accounting/warehouse/company kind of use is impossible. Even the training version I remember there is some kind of @opia with licenses.

Despite all the benefits, such as writing reports, summaries and so on, it does not require much skill and is done in one go - even the minimum configuration is redundant for us.

 

Looking for a programmer to write an EA on my trading idea.

The principle of "Our ideas - Your gasoline", if the advisor will be unprofitable - I will reimburse the work in hard currency as agreed.