MQL Sockets

 

Hi there


I'm trying to do simple http sockets with an Expert Advisor , but everytime i use the function SocketConnect i have the error 4014, which is in the doc the fact that i can't call the function because i'm in an indicator, but as i said, i'm in an EA, i also tried to use it in a script, but i have the same error... How do we do ?

 

Search here (top right the lense) for "socket".

  1. Start with documentation like https://www.mql5.com/en/docs/network and use/study the examples.
  2. Then select the articles
  3. Finally get to the CodeBase ...
They are all selectable on the lest side.
Documentation on MQL5: Network Functions
Documentation on MQL5: Network Functions
  • www.mql5.com
The Socket* group of functions allows establishing a TCP connection (including a secure TLS) with a remote host via system sockets. The operation principle is simple: create a socket, connect to the server and start reading and writing data. For end-user security, the list of allowed IP addresses is implemented on the client terminal side. The...
 
Carl Schreiber:

Search here (top right the lense) for "socket".

  1. Start with documentation like https://www.mql5.com/en/docs/network and use/study the examples.
  2. Then select the articles
  3. Finally get to the CodeBase ...
They are all selectable on the lest side.
Thank's mate, just seen that you need to put it in the options ! Sorry for the inconvenience >< such dumb
 
iiztp:
Thank's mate, just seen that you need to put it in the options ! Sorry for the inconvenience >< such dumb

were you able to use Socket in EA ?! i'm able to use it in Scripts, but not in the EA and it just gives me Error 4014!

Reason: