Help with indicator telegram BOT


Good afternoon everyone, I'm having some difficulty in making a bot get the pre-alerts from an indicator to OB, and send them to the telegram what I did was based on Voytenko's documentation, This file here was written by Wemerson C. , I'm using it



#import  "Wininet.dll"

   int InternetOpenW(string, int, string, string, int);

   int InternetConnectW(int, string, int, string, string, int, int, int); 

   int HttpOpenRequestW(int, string, string, int, string, int, string, int); 

   int InternetOpenUrlW(int, string, string, int, int, int);

   int InternetReadFile(int, uchar & arr[], int, int& OneInt[]);

   int InternetCloseHandle(int); 

   int HttpQueryInfoW(int ,int ,uchar &lpvBuffer[],int& lpdwBufferLength, int& lpdwIndex);


void ReadUrl(string url, string& data)


int HttpOpen = InternetOpenW(" ", 0, " ", " ", 0); 

   int HttpConnect = InternetConnectW(HttpOpen, "", 80, "", "", 3, 0, 1); 

   int HttpRequest = InternetOpenUrlW(HttpOpen, url, NULL, 0, 0, 0);


   uchar cBuff[5];

   int cBuffLength=10;

   int cBuffIndex=0;

   int HttpQueryInfoW = HttpQueryInfoW(HttpRequest, HTTP_QUERY_STATUS_CODE, cBuff, cBuffLength, cBuffIndex);


   // HTTP Codes... Only the 1st character (4xx, 5xx, etc)

   int http_code = (int) CharArrayToString(cBuff, 0, WHOLE_ARRAY, CP_UTF8);   

   if( http_code==4 || http_code==5 ){ // 4XX || 5XX

      Print("HTTP Error: ", http_code, "XX");

      if (HttpRequest > 0) InternetCloseHandle(HttpRequest); 

      if (HttpConnect > 0) InternetCloseHandle(HttpConnect); 

      if (HttpOpen > 0) InternetCloseHandle(HttpOpen);  



      int read[1];

      uchar  Buffer[];

      ArrayResize(Buffer, READURL_BUFFER_SIZEX + 1);


      while (true)


         InternetReadFile(HttpRequest, Buffer, READURL_BUFFER_SIZEX, read);

         string strThisRead = CharArrayToString(Buffer, 0, read[0], CP_UTF8);

         if (read[0] > 0)

            data = data + strThisRead;






   if (HttpRequest > 0) InternetCloseHandle(HttpRequest); 

   if (HttpConnect > 0) InternetCloseHandle(HttpConnect); 

   if (HttpOpen > 0) InternetCloseHandle(HttpOpen);  


and I call this file inside my code as shown below, however, it returns me a bad request 4xx error, other codes I have as an example, only send inputs when they are done in MQL4, and not the pre-alert of an indicator and if it gave win or loss, can anyone help me in this regard? with an example or the path I should follow. I thank you all.

#include <Wininet.mqh>
#define telegramBaseURL   ""

/// почитать как что отправлять
input string inpToken="111111111:gdfgsdfgsdfgsSDASffasd f";//Token
input string inpChat_id ="-346546546546456456";
bool inpParsMode =true;

int OnInit()
    string data;
    string url="" + inpToken + "/sendMessage?chat_id="+inpChat_id;
      url = url + "&parse_mode=HTML";
    url = url + "&text= " + "<b>1114</b>";


Download wininet dll and put to MQL libraries folder