Variable being accessible to external pgm.

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Variable being accessible to external pgm.

Postby arjfca » 03 Jun 2011

Hello

Anyone as information about a way to have variables being able to communicate to and from another software. My goal is to design a macro in Excel that will send command to MC. Multicharts would be reading a registry or a variable that as been modified via a macro in Excel. Doing that I should be able to control MC via Excel.

Is it possible to create, read or write to a registry in MC?

Few months ago, I read something about it in a TS forum, but I just can't find it back.

Any help appreciated

Martin

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Variable being accessible to external pgm.

Postby Stan Bokov » 03 Jun 2011

Dear arjfca,

I think you can communicate from EL to EXCEL with ELEXCEL.dll collection. http://www.traderslaboratory.com/forums ... -6521.html

In terms of changing reg values for MC in the registry, I'm not sure what you are trying to achieve or how that will benefit you. Please clarify.

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

Re: Variable being accessible to external pgm.

Postby arjfca » 03 Jun 2011

Dear arjfca,

I think you can communicate from EL to EXCEL with ELEXCEL.dll collection. http://www.traderslaboratory.com/forums ... -6521.html

In terms of changing reg values for MC in the registry, I'm not sure what you are trying to achieve or how that will benefit you. Please clarify.
How if I use a registry as a way to keep a variable value. Using this way, i could be able to read and transmit info between MC and Excel If both program could read and modify it.

Example, at the moment, In Excel, I'm using a registry to keep a counter value. Using this solution, the value is never lost whenever i switch off Excel. So basically, I'm looking for a way to communicate some variables between MC and the other world. I could do it using a text file, but i suppose that the result will be slower as it will need to open, read, close a file very often.

The main project will be to use Excel to create macro that will control some registry. MC read those registry and acted accordingly to the value. The goal. Having the possibility to manually control all aspect of a trade without having to enter all the values on the broker site.

I don't trade with fixed value like position size, stop entry, stop loss etc. For all orders I need to key in all these info. MC could do that for me, all i need to decide, is GO with the orders. MC should do the order and position managing after. The GO and order modification would then be transmit via a variable or registry to MC via a macro in Excel. MC will be coded to send the order only after receiving a confirmation GO.

For that usage, Excel is only use because it is easy for me to code with it. For sure not the best tool but with my programming knowledge will be feasible.

Hope it is clearer

Martin

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Variable being accessible to external pgm.

Postby TJ » 03 Jun 2011

Dear arjfca,

I think you can communicate from EL to EXCEL with ELEXCEL.dll collection. http://www.traderslaboratory.com/forums ... -6521.html

In terms of changing reg values for MC in the registry, I'm not sure what you are trying to achieve or how that will benefit you. Please clarify.
How if I use a registry as a way to keep a variable value. Using this way, i could be able to read and transmit info between MC and Excel If both program could read and modify it.

Example, at the moment, In Excel, I'm using a registry to keep a counter value. Using this solution, the value is never lost whenever i switch off Excel. So basically, I'm looking for a way to communicate some variables between MC and the other world. I could do it using a text file, but i suppose that the result will be slower as it will need to open, read, close a file very often.

The main project will be to use Excel to create macro that will control some registry. MC read those registry and acted accordingly to the value. The goal. Having the possibility to manually control all aspect of a trade without having to enter all the values on the broker site.

I don't trade with fixed value like position size, stop entry, stop loss etc. For all orders I need to key in all these info. MC could do that for me, all i need to decide, is GO with the orders. MC should do the order and position managing after. The GO and order modification would then be transmit via a variable or registry to MC via a macro in Excel. MC will be coded to send the order only after receiving a confirmation GO.

For that usage, Excel is only use because it is easy for me to code with it. For sure not the best tool but with my programming knowledge will be feasible.

Hope it is clearer

Martin
I think there is a misunderstanding due to the use of the term "registry".

"Registry" is a special place in the Windows Operating system where you store software parameters.
http://en.wikipedia.org/wiki/Windows_Registry

When you say "registry" around computers, most people will think you are referring to the Windows Registry, which is a place you should not touch.

Maybe you are thinking of a "dépositaire"?

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Variable being accessible to external pgm.

Postby Stan Bokov » 03 Jun 2011

You could use a DLL... reference it from your code, and update it from some other application.

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

Re: Variable being accessible to external pgm.

Postby arjfca » 03 Jun 2011

OK
Never work with that. I will seek some info


Return to “MultiCharts”