Get name of broker from strategy?

Questions about MultiCharts and user contributed studies.
firemag
Posts: 35
Joined: 15 Sep 2017
Has thanked: 4 times
Been thanked: 2 times

Get name of broker from strategy?

Postby firemag » 08 Feb 2018

From strategy EL code, is it possible to query the name of the broker associated with an automated strategy?

Also, a related question... it is possible to query information on the current open positions for the account (i.e., symbol name, number of contracts, etc.)?

User avatar
Anna MultiCharts
Posts: 125
Joined: 14 Jul 2017
Has thanked: 4 times
Been thanked: 22 times

Re: Get name of broker from strategy?

Postby Anna MultiCharts » 09 Feb 2018

Hello, firemag!

That is not possible to get the Broker name for the strategy by means of PowerLanguage.
You can get the name of the symbol to which your study is applied by using the SymbolName/GetSymbolName keywords:
https://www.multicharts.com/trading-sof ... SymbolName
https://www.multicharts.com/trading-sof ... SymbolName
The number of contracts for which the position is opened can be accessed by the CurrentContracts keyword:
https://www.multicharts.com/trading-sof ... tContracts
Please find other position related keywords here:
https://www.multicharts.com/trading-sof ... _Positions

firemag
Posts: 35
Joined: 15 Sep 2017
Has thanked: 4 times
Been thanked: 2 times

Re: Get name of broker from strategy?

Postby firemag » 09 Feb 2018

Anna MultiCharts wrote:Hello, firemag!

That is not possible to get the Broker name for the strategy by means of PowerLanguage.
You can get the name of the symbol to which your study is applied by using the SymbolName/GetSymbolName keywords:
https://www.multicharts.com/trading-sof ... SymbolName
https://www.multicharts.com/trading-sof ... SymbolName
The number of contracts for which the position is opened can be accessed by the CurrentContracts keyword:
https://www.multicharts.com/trading-sof ... tContracts
Please find other position related keywords here:
https://www.multicharts.com/trading-sof ... _Positions
Thanks, Anna. I am familiar with SymbolName and CurrentContracts for the local strategy itself. I was wondering if there was the facility to access the current real-time symbols/contracts for an entire account. TS provides this in their object-oriented flavor of EasyLanguage (as "provider" objects) and was wondering if there was anything comparable in MC?

Also, if this is possible outside EasyLanguage, I am also able to program a C DLL if the information could be available that way.

User avatar
Anna MultiCharts
Posts: 125
Joined: 14 Jul 2017
Has thanked: 4 times
Been thanked: 22 times

Re: Get name of broker from strategy?

Postby Anna MultiCharts » 15 Feb 2018

firemag,

I’m afraid PowerLanguage doesn’t have the ability to access the info you specified and there’s no way you can retrieve it from a dll written in C# by means of PowerLanguage.
Please name the exact fields that you’d like to get access to so that I could provide a more precise answer in respect of each.


Return to “MultiCharts”