Exchanging data between MC and C#

Questions about MultiCharts and user contributed studies.
maisatomai
Posts: 83
Joined: 18 Mar 2013
Has thanked: 11 times

Exchanging data between MC and C#

Postby maisatomai » 24 Oct 2014

Just wondering whether it can be done? Maybe write to text and reading from text may be an option but is there a better option?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Exchanging data between MC and C#

Postby JoshM » 25 Oct 2014


User avatar
Smoky
Posts: 517
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 99 times
Been thanked: 121 times

Re: Exchanging data between MC and C#

Postby Smoky » 25 Oct 2014

the only way who works today is GlobalVariables ....


@JoshM
MC does not use all of them, you can use these solutions if you have source-code of the two applications ;)

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Exchanging data between MC and C#

Postby JoshM » 25 Oct 2014

the only way who works today is GlobalVariables ....
Can C# access the GlobalVariables set by MC? If so, how? That would be quite awesome and convenient.
@JoshM
MC does not use all of them, you can use these solutions if you have source-code of the two applications ;)
I don't follow/understand "MC does not use all of them". What should MC use of them?

But you don't need the source code of the application to work with pipes; a C# app or a MC .NET script can access/write to the pipe, and a C++ DLL used in a MultiCharts script can be the other part of the pipe.

Pipes are a stream just like the StreamWriter and StreamReader classes used in C# to write and read from a file, respectively.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Exchanging data between MC and C#

Postby arjfca » 27 Oct 2014

Just wondering whether it can be done? Maybe write to text and reading from text may be an option but is there a better option?
Not sure if it answer your question

I do transfert data between MC and in my case Excel using Global Variable and also a Text file

I had to switch to the text file when I installed MC 64. Excel still running in 32 so Global Variable where not anymore compatible

Data are stored in a CSV style string and I use a function Splitstring(x) to go fetch the desired portion of the string. If you ever need, I made the function available. Just search on the site

Martin


Return to “MultiCharts”