Looking for sample code to integrate url within indicator and EA

 
Looking for sample code to integrate url within indicator and  EA
 
elaborate plaease
 
nicholi shen:
elaborate plaease

How to load webpage on chart window of MT4

 
nicholi shen:
elaborate plaease

I want to call and display entire web page not data from is 

Files:
 
autox trading:

How to load webpage on chart window of MT4

nicholi shen:
elaborate plaease

I am trying to load a webpage in a EA or Indicator see sample code I have . and screen shot of what Im looking for . I have got this far no errors however it loads the frame but not the webpage in it

#property copyright "Copyright 2018, "
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
void OnStart()
  {
   string cookie=NULL,headers;
   char post[],result[];
   int res;
   int timeout=5000;
//--- to enable access to the server, you should add URL 
//--- in the list of allowed URLs (Main Menu->Tools->Options, tab "Expert Advisors"):
   string url="https://www.google.com/finance";//check if its http or https
//--- Reset the last error code
   ResetLastError();
//--- Loading a html page from google.com/finance
   res=WebRequest("GET",url,cookie,NULL,timeout,post,0,result,headers);
//--- Checking errors
   if(res==-1)
     {
      Print("Error in WebRequest. Error code  =",GetLastError());
      //--- Perhaps the URL is not listed, display a message about the necessity to add the address
      MessageBox("Add the address '"+google_url+"' in the list of allowed URLs on tab 'Expert Advisors'","Error",MB_ICONINFORMATION);
     }
//--- Load successfully
      PrintFormat("The file has been successfully loaded, File size =%d bytes.",ArraySize(result));
      //create string with the result
      int tit=ArraySize(result)-1;
      string html="";
      for(int xx=0;xx<=tit;xx++)
       {
       html=html+CharToStr(result[xx]);
       }
     Alert(html);
     //BNC_API_RESPONSE=html;
     }   
     
 
autox trading:

...

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

Thank you.

 
autox trading:

I want to call and display entire web page not data from is 

This is not a simple thing. To display webpage you must have a program to parse it like a web browser.

One way to do this is to write dll library in C++ to embed browser OLE control in chart window. It requires knowledge of C++ and win api programming.

 
Janusz Trojca:

This is not a simple thing. To display webpage you must have a program to parse it like a web browser.

One way to do this is to write dll library in C++ to embed browser OLE control in chart window. It requires knowledge of C++ and win api programming.

Im very new to this and limited coding experience . Trying to find a sample that works ,that I can learn from . Thanks for your reply

 
Sergey Golubev:

Apologies I'm new to this appreciate your input 


#property copyright "Copyright 2018, "
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
void OnStart()
  {
   string cookie=NULL,headers;
   char post[],result[];
   int res;
   int timeout=5000;
//--- to enable access to the server, you should add URL 
//--- in the list of allowed URLs (Main Menu->Tools->Options, tab "Expert Advisors"):
   string url="https://www.google.com/finance";//check if its http or https
//--- Reset the last error code
   ResetLastError();
//--- Loading a html page from google.com/finance
   res=WebRequest("GET",url,cookie,NULL,timeout,post,0,result,headers);
//--- Checking errors
   if(res==-1)
     {
      Print("Error in WebRequest. Error code  =",GetLastError());
      //--- Perhaps the URL is not listed, display a message about the necessity to add the address
      MessageBox("Add the address '"+google_url+"' in the list of allowed URLs on tab 'Expert Advisors'","Error",MB_ICONINFORMATION);
     }
//--- Load successfully
      PrintFormat("The file has been successfully loaded, File size =%d bytes.",ArraySize(result));
      //create string with the result
      int tit=ArraySize(result)-1;
      string html="";
      for(int xx=0;xx<=tit;xx++)
       {
       html=html+CharToStr(result[xx]);
       }
     Alert(html);
     //BNC_API_RESPONSE=html;
     }   
     
 

autox trading: Im very new to this and limited coding experience . Trying to find a sample that works ,that I can learn from . Thanks for your reply

Apologies I'm new to this appreciate your input

You have already been answered! To display a web page on the chart requires knowledge and coding skills too advanced for you. Your will never be able to do it with your limited experience.

As far as I know, there is no such examples in the CodeBase and even if there was, it would still be too advanced for you to adapt it.

Your only hope is to hire an advanced coder in the Freelance section with experience, skill and knowledge of C++ and WinAPI coding.

If your intention is to then sell it as a product on the MQL5 Market, then it will however not be accepted due to limitations that are imposed.

 
What is the purpose of displaying a webpage in a chart window? If you answer this question, there will possibly be other answers/solutions.
Reason: