using System;using cAlgo.API;namespacecAlgo.Robots { [Robot(AccessRights = AccessRights.None, AddIndicators = true)] publicclassTESTlistenonly : Robot { public WebSocketClient client; publicstring uri; protectedoverridevoidOnStart() { Print("attempting connection"); client = new WebSocketClient(); var uri = new Uri("wss://server:25345/"); client.Connect(uri); Print("WebSocket connection opened"); } }}
I have my own server running on port 25345 and it works on local execution but on the cloud it says this
There was no mention of web sockets in the initial post. Yes, it's possible to use web sockets through port 25345. Does your server listen to this port?
using System;using cAlgo.API;namespacecAlgo.Robots { [Robot(AccessRights = AccessRights.None, AddIndicators = true)] publicclassTESTlistenonly : Robot { public WebSocketClient client; publicstring uri; protectedoverridevoidOnStart() { Print("attempting connection"); client = new WebSocketClient(); var uri = new Uri("wss://server:25345/"); client.Connect(uri); Print("WebSocket connection opened"); } }}
I have my own server running on port 25345 and it works on local execution but on the cloud it says this
There was no mention of web sockets in the initial post. Yes, it's possible to use web sockets through port 25345. Does your server listen to this port?
Hello Panagiotis, thank you for the reply. Sorry I meant to say in my reply that I switched to trying WebSockets after i found out in the article no HTTP requests won't be sent. And yes my server does listen to post 25345, it works on local execution and i check it on a ping test. It's also using SSH. If you would like to try its up right now on wss://araxy.co.uk:25345/
using System;using cAlgo.API;namespacecAlgo.Robots { [Robot(AccessRights = AccessRights.None, AddIndicators = true)] publicclassTESTlistenonly : Robot { public WebSocketClient client; publicstring uri; protectedoverridevoidOnStart() { Print("attempting connection"); client = new WebSocketClient(); var uri = new Uri("wss://server:25345/"); client.Connect(uri); Print("WebSocket connection opened"); } }}
I have my own server running on port 25345 and it works on local execution but on the cloud it says this
There was no mention of web sockets in the initial post. Yes, it's possible to use web sockets through port 25345. Does your server listen to this port?
Hello Panagiotis, thank you for the reply. Sorry I meant to say in my reply that I switched to trying WebSockets after i found out in the article no HTTP requests won't be sent. And yes my server does listen to post 25345, it works on local execution and i check it on a ping test. It's also using SSH. If you would like to try its up right now on wss://araxy.co.uk:25345/
Cloud execution
Local execution
Browser websocket test
Try wss://server:25345 instead of wss://server:25345/
using System;using cAlgo.API;namespacecAlgo.Robots { [Robot(AccessRights = AccessRights.None, AddIndicators = true)] publicclassTESTlistenonly : Robot { public WebSocketClient client; publicstring uri; protectedoverridevoidOnStart() { Print("attempting connection"); client = new WebSocketClient(); var uri = new Uri("wss://server:25345/"); client.Connect(uri); Print("WebSocket connection opened"); } }}
I have my own server running on port 25345 and it works on local execution but on the cloud it says this
There was no mention of web sockets in the initial post. Yes, it's possible to use web sockets through port 25345. Does your server listen to this port?
Hello Panagiotis, thank you for the reply. Sorry I meant to say in my reply that I switched to trying WebSockets after i found out in the article no HTTP requests won't be sent. And yes my server does listen to post 25345, it works on local execution and i check it on a ping test. It's also using SSH. If you would like to try its up right now on wss://araxy.co.uk:25345/
Cloud execution
Local execution
Browser websocket test
Try wss://server:25345 instead of wss://server:25345/
Thank you for the reply, I'm still getting the same error message, double checked the server and ran it locally again and it works fine. I think it has to be something to do with the cloud instance
This website uses cookies to enhance site navigation, analyze site usage, and assist in our marketing efforts. By clicking “Accept All” you are providing your consent to our use of all cookies. Alternatively, please provide your choice by pressing “Customize Cookies”. For more information, please read our Privacy policy
firemyst
11 Aug 2024, 11:02 ( Updated at: 11 Aug 2024, 15:29 )
Your bot probably won't work as you want because if you read this page:
https://help.ctrader.com/ctrader-algo/synchronisation/requirements-for-cbots/#compile-time-references
http requests aren't sent when bots run in the cloud.
@firemyst