Can MT4 send WebRequest or Need DLL ?

 
Hello, I want to know can MT4 send WebRequest to a server or website directly like MT5 or I need to build a .dll file to do that ?
 
WebRequest - Common Functions - MQL4 Reference
WebRequest - Common Functions - MQL4 Reference
  • docs.mql4.com
WebRequest - Common Functions - MQL4 Reference
 

Hello, I have done sending WebRequest from MT4 and MT5 EA now, but when I am trying to do the same from the MT5 or MT4 indicator, its not working and this error is coming up, indicators doesn't have the functionality to do so ?


ERROR : OnInit > Server response is -1 and the last error is 4014

 
Mql4 web request does not support put and delete methods. Is this your case? It is better to share your code. Maybe people can help.
 
Yashar Seyyedin #:
Mql4 web request does not support put and delete methods. Is this your case?

I am trying to send license key to a website using API using POST method, so its working for MT4 and MT5 expert advisor, but when I am using the same thing for MT4 and MT5 indicator, it is not working, I have also increased the timeout as well but still the same thing. So that's why I wanted to know, wether it is allowed to send POST WebRequest directly for MT4 and MT5 indicator or not.

 
Abhimanyu Hans #:

I am trying to send license key to a website using API using POST method, so its working for MT4 and MT5 expert advisor, but when I am using the same thing for MT4 and MT5 indicator, it is not working, I have also increased the timeout as well but still the same thing. So that's why I wanted to know, wether it is allowed to send POST WebRequest directly for MT4 and MT5 indicator or not.

The WebRequest() function is synchronous, which means its breaks the program execution and waits for the response from the requested server. Since the delays in receiving a response can be large, the function is not available for calls from the indicators, because indicators run in a common thread shared by all indicators and charts on one symbol. Indicator performance delay on one of the charts of a symbol may stop updating of all charts of the same symbol.
Study the manual...
 
Yes, I have studies the thread and I understand that indicators cannot perform the WebReuqest direclty, but then what is the way to do so ? What are the options we have ?
 
2 steps:
- script creates / updates license file
- indicator validates the file
Good luck
 
Soewono Effendi #:
2 steps:
- script creates / updates license file
- indicator validates the file
Good luck
Yes, I also figured this out, created an EA which will validate the license from the server and indicator will read the EA validation or not to run or stop. But the problem is what will happen when there are more than 1 indicator and because of the same license validation and verification code, uses the same license key and initialise? 
Reason: