Page 1 of 1

Exchanging data between MC and C#

Posted: Oct 24 2014
by maisatomai
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?

Re: Exchanging data between MC and C#

Posted: Oct 25 2014
by JoshM

Re: Exchanging data between MC and C#

Posted: Oct 25 2014
by Smoky
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 ;)

Re: Exchanging data between MC and C#

Posted: Oct 25 2014
by JoshM
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.

Re: Exchanging data between MC and C#

Posted: Oct 27 2014
by arjfca
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