Is it possible to get MC powerlanguage to interact with own applications that are coded with VS C#.
For example a customized toolbar or display that send info to MC and get info from MC.
Or is this only possible with MC.Net?
Projects made in VS studio C# interact with MC powerlanguage [SOLVED]
Re: Projects made in VS studio C# interact with MC powerlang
I think user 'gboos' wrote his own application to execute trade signals, change limit exits & stops related to his studies in TT (Trading Technologies) in C# without using Multicharts API. AT the time execution from MC in TT wasn't available. So it should be no problem ... May you want to contact him, but I haven't seen him for quite a while.
Regards.
Ben
Regards.
Ben
-
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 124 times
Re: Projects made in VS studio C# interact with MC powerlang
Thanks Bensat,
Do you or other users know if the interacting works like we call the global variabels dll in powerlanguage.
I remember a post on the forum (which I can not find anymore) that it was only possible with C++ and I am not sure it will work with C#.
And a second question (much further beyond simple data from MC) is, if it's possible to get info from MC powerlanguage, where there is no reserved word for. For example, set indicators or signals to off/on. There is no way you can do this by code. Is it possible to do this by an external C# application, tapping in MC and get out the info that you want and control MC like you want.
Do you or other users know if the interacting works like we call the global variabels dll in powerlanguage.
Code: Select all
DefineDLLFunc: "GlobalVariable.dll", int, "GV_GetNamedInt", lpstr, int ;
And a second question (much further beyond simple data from MC) is, if it's possible to get info from MC powerlanguage, where there is no reserved word for. For example, set indicators or signals to off/on. There is no way you can do this by code. Is it possible to do this by an external C# application, tapping in MC and get out the info that you want and control MC like you want.
Re: Projects made in VS studio C# interact with MC powerlang [SOLVED]
Depending on what you're trying to achieve, you can either use GlobalVariable.dll or just create your own .dll and use that instead. I chose the latter.Do you or other users know if the interacting works like we call the global variabels dll in powerlanguage.
Code: Select all
DefineDLLFunc: "GlobalVariable.dll", int, "GV_GetNamedInt", lpstr, int ;
Yes, it is possible with C#. I've had to create MC callable .dlls in both C++ and C#. However, the C# route will require a wrapper to handle the 'unmanaged-to-managed-to-unmanaged' dialogue.I remember a post on the forum (which I can not find anymore) that it was only possible with C++ and I am not sure it will work with C#.
-
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 124 times
Re: Projects made in VS studio C# interact with MC powerlang
Thanks Jad for the confirmation that C# works with normal MC.
After your post I did some googling on the forum, and I found a post about a wrapper I think.
http://www.multicharts.com/discussion/v ... 498#p51649
I will give that a try.
After your post I did some googling on the forum, and I found a post about a wrapper I think.
http://www.multicharts.com/discussion/v ... 498#p51649
I will give that a try.
Re: Projects made in VS studio C# interact with MC powerlang
Yes, 'Call_dotNET_code_from_PL' is a wrapper template that MC sent me when I first enquired about this. I had already started writing my own so I have no experience with using it - but it should be enough to get you going.Thanks Jad for the confirmation that C# works with normal MC.
After your post I did some googling on the forum, and I found a post about a wrapper I think.
http://www.multicharts.com/discussion/v ... 498#p51649
I will give that a try.
This page also has some useful information on using managed mode C# DLLs from unmanaged applications. It is MT centric but the principles still hold.
https://www.mql5.com/en/articles/249