Download MetaTrader 5

Calling WebRequest from CustomIndicator Function ?

To add comments, please log in or register
Young Ho Seo
16357
Young Ho Seo 2015.10.24 22:15 

Hello Fellow coders and traders.

I have lately quite appreciated that MQL4 and 5 language have the native Web Request function: https://www.mql5.com/en/docs/common/webrequest

So far I did not have any success using this WebRequest function for Custom Indicator.

Is there anyone successfully using this native Web Request function or something similar to call website page for Custom Indicator ? (except using any of external dll files like wininet.dll stuffs.)


Kind regards.

Documentation on MQL5: Common Functions / WebRequest
Documentation on MQL5: Common Functions / WebRequest
  • www.mql5.com
Common Functions / WebRequest - Reference on algorithmic/automated trading language for MetaTrader 5
InvestSoft
8707
Janusz Trojca 2015.10.25 00:19  

Documentation says:

The function can be called only from Expert Advisors and scripts, as they run in their own execution threads. If you try to call the function from an indicator, GetLastError() will return error 4014 – "Function is not allowed for call".  

I think that use wininet.dll functions is only way to call website. 

Young Ho Seo
16357
Young Ho Seo 2015.10.25 00:47  
Janusz Trojca:

Documentation says:

The function can be called only from Expert Advisors and scripts, as they run in their own execution threads. If you try to call the function from an indicator, GetLastError() will return error 4014 – "Function is not allowed for call".  

I think that use wininet.dll functions is only way to call website. 

Thanks very clear plus good answer. :)

If we could call script or expert adviser from our custom indicator in regular time interval then we might be able to achieve this without using winner.DLL file. 

Just one more idea. :)
InvestSoft
8707
Janusz Trojca 2015.10.26 10:02  
Yeah. This is another way to realize this idea. It is possible to call script from indicator, but I'm afraid that it needs another dll file (user32.dll).
To add comments, please log in or register