Connecting to ChatGPT from MacOS (Wine/PortForwarding?)

 

Hi,

How do you run WebRequests from an Indicator on a MT5 running on MacOS?

It seems to me that since Metatrader 5 doesnt have a native MacOS application and its using a WINE instance that the port forwarding doesnt work out of the box.

I have tried forwarding ports to Wine using socat and enabled allowed WebUrls http://localhost:XXXX/  but it still has problems receiving from the API like https://api.openai.com/ 

Did someone manage to get WebRequests working on MacOS fully?

I think sending out requests works, but receiving responses from the API doesnt work out of the box.

The roundabout way to forward ports from inside Mac also doesnt seem to work.

Any tips?

 
Andreas Alois Aigner:

Hi,

How do you run WebRequests from an Indicator on a MT5 running on MacOS?

It seems to me that since Metatrader 5 doesnt have a native MacOS application and its using a WINE instance that the port forwarding doesnt work out of the box.

I have tried forwarding ports to Wine using socat and enabled allowed WebUrls http://localhost:XXXX/  but it still has problems receiving from the API like https://api.openai.com/ 

Did someone manage to get WebRequests working on MacOS fully?

I think sending out requests works, but receiving responses from the API doesnt work out of the box.

The roundabout way to forward ports from inside Mac also doesnt seem to work.

Any tips?

MetaTrader on Mac is a hassle at the moment.

Get Windows (Parallels Desktop on Mac) and focus on your strategy not logistics.
 
Oleksandr Medviediev #:
MetaTrader on Mac is a hassle at the moment.

Get Windows (Parallels Desktop on Mac) and focus on your strategy not logistics.

Thanks. will do. Strange it somehow worked interacting then without doing anything. Not sure why.

Maybe one doesnt need port forwarding at all even though its running on Wine in MacOS.

 
Andreas Alois Aigner: How do you run WebRequests from an Indicator on a MT5 running on MacOS?

Perhaps you should read the manual, or press F1 in the editor. WebRequest - Network Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
   How To Ask Questions The Smart Way. (2004)
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

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 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.

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".