Task: implementation of daily analytics in MQL5 with online display - page 8

 
sanyooooook:
where do you want to post?
Yeah, it doesn't really matter. I'm interested in solving this problem withWebRequest.
 
Renat:

By the way yes, publishing templates (template + screenshot) is a much better analytics system, as anyone can download it from the website and see all the indicators, objects etc. And it's good for manual publishing.

Most likely, we will open "Analytics" section, where the subsections will be "Charts" (where screenshots are published now), "Profiles/Templates" (template + screenshot + description text) with the possibility of discussion, "Blogs" for personal blogging. Accordingly, further sub-sections can be added, including automatic publications.

How will the templates be published if the template has a paid indicator from Market?
 
Renat:

There are in-house ones - check out the WebRequest function.

You can use it to do anything over HTTP/HTTPS protocols.

Oh, far from anything. There's no way in hell you're going to extract data from a layer whose content is dynamically generated by AJAX. And you won't get authorization on site where it's required for further work.

Only POST/GET requests... ...you'll get responses and that's it.

 
fyords:
No, the problem is that WebRequest doesn't allow (maybe I don't know how) to generate its own headers.

If you useHttpOpenRequest, you can also useHttpAddRequestHeaders to set HTTP header.

Only in the example above you need to import functions with postfix W instead of A. For exampleHttpOpenRequestA =>HttpOpenRequestW.

Something like this

 
elugovoy:

If you useHttpOpenRequest, you can also useHttpAddRequestHeaders to set HTTP header.

Only in the example above you need to import functions with postfix W instead of A. For exampleHttpOpenRequestA =>HttpOpenRequestW.

Like this

That's right, but I'm only interested in the regular features. They won't let me into the Market with dll.
 
fyords:
No, the problem is that WebRequest doesn't allow (maybe I don't know how) to generate its own headers.
Does this mean that even from mql5.com anything can't be downloaded from the authorised part without wininet?
 
zaskok:
Does this mean that even from mql5.com you cannot download anything from the authorised part without wininet?
I think not.
 

Bringing up an old topic.

Is it now possible to access a .tpl file generated through ChartSaveTemplate() via MQL?

File is hardcoded into Profiles/Templates and this is outside of sandboxes.

Although in the documentation, in theChartApplyTemplate() function

https://www.mql5.com/ru/docs/chart_operations/chartapplytemplate

example where the file is read from Files folder

How did they get into this folder?

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- пример применения шаблона, расположенного в каталоге \MQL5\Files
   if(FileIsExist("my_template.tpl"))
     {
      Print("Шаблон my_template.tpl найден в каталоге \Files'");
      //--- применим найденный шаблон
      if(ChartApplyTemplate(0,"\\Files\\my_template.tpl"))
        {
         Print("Применили успешно шаблон 'my_template.tpl'");
         //--- принудительно перерисуем график для быстрого показа изменений
         ChartRedraw();
        }
      else
         Print("Не удалось применить шаблон 'my_template.tpl', ошибка ",GetLastError());
     }
   else
     {
      Print("Файл 'my_template.tpl' не найден в папке "
            +TerminalInfoString(TERMINAL_PATH)+"\\MQL5\\Files");
     }
  }


The task is to send the texts of tpl files by expert to the server.

Документация по MQL5: Операции с графиками / ChartApplyTemplate
Документация по MQL5: Операции с графиками / ChartApplyTemplate
  • www.mql5.com
Операции с графиками / ChartApplyTemplate - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Igor Volodin:

Bringing up an old topic.

Is it now possible to access a .tpl file generated through ChartSaveTemplate() via MQL?

File is hardcoded into Profiles/Templates and this is outside of sandboxes.

Although in theChartApplyTemplate() function in the documentation

https://www.mql5.com/ru/docs/chart_operations/chartapplytemplate

example where the file is read from Files folder

How did they get into this folder?

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- пример применения шаблона, расположенного в каталоге \MQL5\Files
   if(FileIsExist("my_template.tpl"))
     {
      Print("Шаблон my_template.tpl найден в каталоге \Files'");
      //--- применим найденный шаблон
      if(ChartApplyTemplate(0,"\\Files\\my_template.tpl"))
        {
         Print("Применили успешно шаблон 'my_template.tpl'");
         //--- принудительно перерисуем график для быстрого показа изменений
         ChartRedraw();
        }
      else
         Print("Не удалось применить шаблон 'my_template.tpl', ошибка ",GetLastError());
     }
   else
     {
      Print("Файл 'my_template.tpl' не найден в папке "
            +TerminalInfoString(TERMINAL_PATH)+"\\MQL5\\Files");
     }
  }


The task is to send the texts of tpl files to the server.

The file with chart templates has recently been located in " Terminal data directory\MQL5\Profiles":

Terminal: templates and chart profiles have been moved from [Terminal Data Catalog\Profiles] to [Terminal Data Catalog\MQL5\Profiles]. Now you can easily add templates to the MQL5 Storage and use them from any computer.

 
Vladimir Karputov:

The file with chart templates is located in [ Terminal data directory\MQL5\Profiles] recently:

Terminal: Templates and chart profiles have been moved from [Terminal data catalog\Profiles] to [Terminal data catalog\MQL5\Profiles]. Now you can easily add templates to the MQL5 Storage and use them from any of your computers.

I guess this answer means "No, you can't access the text of saved .tpl file from MQL".