and again dll and market - page 10

 
Alexsandr San:

if rewritten?

or like this

yes, this is a binary, but not in the context of a public web service)

I don't see the usefulness of this code, unfortunately

 
Alexsandr San:

Thank you! I'm just trying to get a sense of what the man is trying to make.

Shosh! :) 401 is an error number returned by ibm web server, you should not look for it in the MQL5 doc

 
Nikolai Karetnikov:

done

Go to the Service Desk link in your profile and create a new application there. Choose a subject such as "Financial transactions restricted". Write there that you have unknowingly violated the rules of the resource by creating a second account. And ask to delete it. Attach a link to the account to be deleted.

 
Nikolai Karetnikov:

Aryom, is there provision for merging accounts?

No.

 

And another thing, the WebRequest doc says that there are 2 variants of this function. The first one works with Content-Type: application/x-www-form-urlencoded, which is obviously not suitable, because IBM asks for "header "Content-Type: application/json"

But that's all I've understood so far

 

I got something.

except the file doesn't sound

Shot4

//+------------------------------------------------------------------+
//|                                                   WebRequest.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   string cookie=NULL,headers;
   char   post[],result[];
   headers = "curl -X POST -u" "apikey:GR1bb3zVMs9fcNKL6pA9-5zj9ptWliCu6eh9oupUnpZB";
   headers = "Content-Type: application/json";
   headers = "Accept: audio/wav";
   headers = "data" "{\"text\":\"hello world\"}";
//output hello_world.wav ^

   string url="https://api.eu-gb.text-to-speech.watson.cloud.ibm.com";
//--- для работы с сервером необходимо добавить URL "https://finance.yahoo.com"
//--- в список разрешенных URL (Главное меню->Сервис->Настройки, вкладка "Советники"):
//--- обнуляем код последней ошибки
   ResetLastError();
//--- загрузка html-страницы с Yahoo Finance
   int res=WebRequest("GET",url,cookie,NULL,500,post,0,result,headers);
   if(res==-1)
     {
      Print("Ошибка в WebRequest. Код ошибки  =",GetLastError());
      //--- возможно, URL отсутствует в списке, выводим сообщение о необходимости его добавления
      MessageBox("Необходимо добавить адрес '"+url+"' в список разрешенных URL во вкладке 'Советники'","Ошибка",MB_ICONINFORMATION);
     }
   else
     {
      if(res==200)
        {
         //--- успешная загрузка
         PrintFormat("Файл успешно загружен, размер %d байт.",ArraySize(result));
         //PrintFormat("Заголовки сервера: %s",headers);
         //--- сохраняем данные в файл
         int filehandle=FileOpen("output hello_world.wav",FILE_WRITE|FILE_BIN);
         if(filehandle!=INVALID_HANDLE)
           {
            //--- сохраняем содержимое массива result[] в файл
            FileWriteArray(filehandle,result,0,ArraySize(result));
            //--- закрываем файл
            FileClose(filehandle);
           }
         else
            Print("Ошибка в FileOpen. Код ошибки =",GetLastError());
        }
      else
         PrintFormat("Ошибка загрузки '%s', код %d",url,res);
     }
  }
//+------------------------------------------------------------------+
 

That's what it downloaded.

Picture5

Picture6

I figured it's something to do with the address, change it somehow.

Snapshot7

 
Nikolai Karetnikov:

)))

The idea is not voice control of the terminal and the universe ))), but voice guidance. Let's say every five minutes to sound the price of an instrument from a set, or have the option of setting up voice alerts. Such thing as "Alerts" exist in the terminal, when they are triggered a short beep is played, but what tool it refers to, it is impossible to understand

This task is very complicated, almost impossible because the target boundaries are unclear. What exactly should the Expert Advisor announce? If only the price, you can integrate a set of figures, which can then be combined. If you need the option of recording a custom reminder, which the Expert Advisor will turn on at the right time, then it is not really impossible, but VERY difficult. I almost don't see the point of spending so much energy on a dubious chip.

Be more specific about what you want to do.
 

I understand that the fee for the article should be distributed among the participants in the discussion and all authors should be listed :-)

 
Record a large set of voice files, integrate the resources into the EA, tie their inclusion to the event model and you're done. No need for a web quest.
Reason: