Sample Codes or DLL to do HTTP Post/Get
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Sample Codes or DLL to do HTTP Post/Get
Hello meo,Willing to pay for a DLL to do it. Any interested coders, do let me know. Thanks
Please contact us at support@multicharts.com with details, so we can evaluate such project for you.
Re: Sample Codes or DLL to do HTTP Post/Get
Hi Andrew,
Thanks for the reply. I have actually created a DLL myself using VS10.
The DLL basically makes a HTTP request to my own webpage. Code works fine when called from another C++ application.
However when I call it from my powerlanguage script, there is a connection refused error. Is there any restriction in MultiCharts to prevent HTTP call?
Thanks a lot!
Thanks for the reply. I have actually created a DLL myself using VS10.
The DLL basically makes a HTTP request to my own webpage. Code works fine when called from another C++ application.
However when I call it from my powerlanguage script, there is a connection refused error. Is there any restriction in MultiCharts to prevent HTTP call?
Thanks a lot!
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Sample Codes or DLL to do HTTP Post/Get
There is no restriction in MultiCharts to prevent HTTP call.However when I call it from my powerlanguage script, there is a connection refused error. Is there any restriction in MultiCharts to prevent HTTP call?
Re: Sample Codes or DLL to do HTTP Post/Get
I tried running other functions on the dll and the results is returned correctly to my MultiCharts code.
The "connection refused" error pops up when it ran my HTTPGet function. My DLL makes a call to an external POCO library which provides the HTTP request implementation.
Could I have missed out something? I am running 64 bit MultiCharts. DLL is created for 64bit.
Thanks
The "connection refused" error pops up when it ran my HTTPGet function. My DLL makes a call to an external POCO library which provides the HTTP request implementation.
Could I have missed out something? I am running 64 bit MultiCharts. DLL is created for 64bit.
Thanks
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Sample Codes or DLL to do HTTP Post/Get
Please send us a simple example of code using the file, and the .dll to support@multicharts.com
- PatrickSocal
- Posts: 58
- Joined: 27 Apr 2013
- Location: San Diego, CA
- Has thanked: 23 times
- Been thanked: 30 times
Re: Sample Codes or DLL to do HTTP Post/Get
Hi Meo and Andrew,
Did you ever get this working? I'd be interested in using it, or helping debug it if necessary.
Did you ever get this working? I'd be interested in using it, or helping debug it if necessary.
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Sample Codes or DLL to do HTTP Post/Get
Hello PatckSocal,Did you ever get this working? I'd be interested in using it, or helping debug it if necessary.
Meo used workaround for the problem by having the DLL calling an executable which does the HTTP request.
- PatrickSocal
- Posts: 58
- Joined: 27 Apr 2013
- Location: San Diego, CA
- Has thanked: 23 times
- Been thanked: 30 times
Re: Sample Codes or DLL to do HTTP Post/Get
Hmm... sounds like there was something tricky that didn't work. Do you remember if you were using blocking or non-blocking sockets in your HTTP calls? My first thought is that you want the non-blocking ones.
Also... do you remember what external .exe you used to make it work?
My interest comes from a different reason... I want to monitor the health of our automated trading systems using an external server, so it can alert us if we have problems with 1) any of the strategies, 2) the MultiCharts application(s) or 3) the trading server itself. I've found a nice cloud-hosted server-monitoring service, and they have a RESTful API for submitting regular updates, using HTTP Post calls. I'd like my strategies to be able to use it.
Perhaps that deserves a separate thread of its own. Would you be interested in something like that?
Also... do you remember what external .exe you used to make it work?
My interest comes from a different reason... I want to monitor the health of our automated trading systems using an external server, so it can alert us if we have problems with 1) any of the strategies, 2) the MultiCharts application(s) or 3) the trading server itself. I've found a nice cloud-hosted server-monitoring service, and they have a RESTful API for submitting regular updates, using HTTP Post calls. I'd like my strategies to be able to use it.
Perhaps that deserves a separate thread of its own. Would you be interested in something like that?
Re: Sample Codes or DLL to do HTTP Post/Get
Hi Patrick,
I am not too sure on what type of socket I used as used a POCO library to make the calls.
I created a exe from Visual Studio using c++ to use the POCO http library/ Not special exe.
I did something similar previously but not on Multicharts where my strategy writes periodically to my web server. And I have a cron job running there which checks if its being regularly updated. If it is, everything is good. If not it will send an email to alert me. Ya you will need to have Multicharts make calls to your server for that to work. I don't have immediate need for it now but I am sure I will in the very near future.
I am not too sure on what type of socket I used as used a POCO library to make the calls.
I created a exe from Visual Studio using c++ to use the POCO http library/ Not special exe.
I did something similar previously but not on Multicharts where my strategy writes periodically to my web server. And I have a cron job running there which checks if its being regularly updated. If it is, everything is good. If not it will send an email to alert me. Ya you will need to have Multicharts make calls to your server for that to work. I don't have immediate need for it now but I am sure I will in the very near future.
- PatrickSocal
- Posts: 58
- Joined: 27 Apr 2013
- Location: San Diego, CA
- Has thanked: 23 times
- Been thanked: 30 times
Re: Sample Codes or DLL to do HTTP Post/Get
I see... it sounds like you've thought through some of these things too.
I just started a topic on system health monitoring, where I list the ways an ATS can fail and try to come up with a framework to detect and alert them all.
If you're interested, have a look: viewtopic.php?f=1&t=47391
Perhaps this can make MC and MC.NET more suitable for professional & institutional autotrading.
I just started a topic on system health monitoring, where I list the ways an ATS can fail and try to come up with a framework to detect and alert them all.
If you're interested, have a look: viewtopic.php?f=1&t=47391
Perhaps this can make MC and MC.NET more suitable for professional & institutional autotrading.