Communicating from MultiCharts.NET with another .NET program  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Communicating from MultiCharts.NET with another .NET program

Postby orad » 29 Dec 2013

Hi,

Do you have any sample code or suggestions on how to make data communications from MultiCharts.NET to another program? For example I'm trying to use a WPF application to receive and display messages coming from MC.NET which I can use instead of the MC.NET's output window. I would prefer a communication method that allows the external program to run independently from the PowerLanguage project using a standard service model or protocol. Some of the solutions that I can think of are WCF or any of the REST libraries available but I haven't used any of them and specifically don't know how to use them with MC.NET. Has anybody done this before?

Thanks,

-orad

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Communicating from MultiCharts.NET with another .NET pro

Postby Henry MultiСharts » 30 Dec 2013

Hello orad,

Have you tried to do that via dll? Please see post #2.

User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Re: Communicating from MultiCharts.NET with another .NET pro

Postby orad » 02 Jan 2014

Hi Henry, yes I have tried that but it's not what I'm looking for as it makes the PowerLanguage.NET project tightly coupled with the external program. I was wondering if anybody has tried a service model communication to send/receive data with the PL.NET project.

tradetree
Posts: 81
Joined: 29 Apr 2013
Location: www.threefoldmarkets.com
Has thanked: 12 times
Been thanked: 16 times
Contact:

Re: Communicating from MultiCharts.NET with another .NET pro  [SOLVED]

Postby tradetree » 04 Jan 2014

Yes, you can use the built in .NET internet API to send data to a website. Include

using System.IO;
using System.Net;

You have to write software to call "System.Net.ServicePointManager" and software on the server to receive. If you are not a software developer this may be a challenge. I do this to manage license subscriptions to my strategy services.

CarseWhite
Posts: 26
Joined: 30 Jan 2014
Been thanked: 4 times

Re: Communicating from MultiCharts.NET with another .NET pro

Postby CarseWhite » 30 Jan 2014

MC.net also opens the door to implementing database, such as MSSSQL, or MSSQL Express(file based).

rc76
Posts: 44
Joined: 14 Oct 2020
Has thanked: 11 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby rc76 » 08 Jun 2021

Is there any sample code or project we may reference or build on? A lead will be truly appreciated!


PK1
Posts: 102
Joined: 12 Jun 2011
Has thanked: 42 times
Been thanked: 12 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby PK1 » 09 Jun 2021

there are quite a few ways for MC and MC.Net to communicate with other applications. Imho FX1 is using memory mapped files as I do. When I was researching this years back I came to the conclusion to write my own communication middleware instead of relying on FX1 or alike, even though it seems to be very good.

What I did was using memory mapped files (acting as virtual memory which is persisted on the SDD) to store binary and/or txt-based data, handled in a SharedData.dll + InteropLib. It got way bigger in the meanwhile but for everyone wanting to write own interaction between MC/MC.Net with other applications the concept of memory mapped files is very useful and a simple version not that difficult to implement. This way its easy for any application to just grab the DLL and add / fetch some data of the MMF or do a messaging system.

Emmanuel
Posts: 355
Joined: 21 May 2009
Has thanked: 109 times
Been thanked: 28 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby Emmanuel » 09 Jun 2021

PK1 ,

I wanted to develop mapped memory as well. but I didn't find any example .

Do you have an example of mapped memory ? This would be very helpful . because I need as well to communicate with other application.

This would be much better than using an application of FX1.

Emmanuel
Posts: 355
Joined: 21 May 2009
Has thanked: 109 times
Been thanked: 28 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby Emmanuel » 12 Jun 2021

Thank you PK1 for the link

This is really useful and helpful

rc76
Posts: 44
Joined: 14 Oct 2020
Has thanked: 11 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby rc76 » 19 Jun 2021

Dear Emmanuel PK1, any chance may share the link as well? Thank you so much!


rc76
Posts: 44
Joined: 14 Oct 2020
Has thanked: 11 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby rc76 » 23 Jun 2021

Thank you so much Emmanuel!

Emmanuel
Posts: 355
Joined: 21 May 2009
Has thanked: 109 times
Been thanked: 28 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby Emmanuel » 23 Jun 2021

You are welcome Rc76, I plan to communicate with MT 5 ,
and you ?

rc76
Posts: 44
Joined: 14 Oct 2020
Has thanked: 11 times

Re: Communicating from MultiCharts.NET with another .NET program

Postby rc76 » 23 Jun 2021

I haven't decide yet, most likely I plan to write something up like a WPF/Winform as a helper addon like TS can do.

Will keep you posted once I got prototype up :)


Return to “MultiCharts .NET”