GetAccountID()

Questions about MultiCharts and user contributed studies.
Squib
Posts: 17
Joined: 25 Nov 2011
Has thanked: 19 times
Been thanked: 6 times

GetAccountID()

Postby Squib » 01 Jan 2012

Does the instruction "GetAccountID()" work? I found an old thread, where it was mentioned, that this function will be implemented in MC5.
With following code in a study the value of AccountID stays empty.

Code: Select all

variables:
AccountID("");

AccountID=GetAccountID();
Print("AccountID:",AccountID);

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

Re: GetAccountID()

Postby JoshM » 02 Jan 2012

Hm, that should work. According to the help:
GetAccountID() will return "DU34567" if the account number which is used for auto trading on the chart, where the strategy is applied, is DU12345.
Does it work when you have auto-trading on and a strategy applied to the chart?

See the PowerLanguage Editor help file in MC7.4:
Image
Attachments
scr.231.png
(4.48 KiB) Downloaded 680 times

Squib
Posts: 17
Joined: 25 Nov 2011
Has thanked: 19 times
Been thanked: 6 times

Re: GetAccountID()

Postby Squib » 02 Jan 2012

Hm, that should work. According to the help:
Does it work when you have auto-trading on and a strategy applied to the chart?
Thanks a lot Josh,
that was exactly the point.
After enabling auto-trading the instruction works.
AutomateOrderExecution.jpg
(114.38 KiB) Downloaded 528 times

User avatar
Lobo.Trader
Posts: 12
Joined: 26 Nov 2011
Location: Germany
Has thanked: 19 times
Been thanked: 6 times

Re: GetAccountID()

Postby Lobo.Trader » 29 Jan 2012

Hello

would one friendly supporter please inform , where to find the respective manual which describes all "account & Positions" - functionality or include some/any code examples ? Still asking even though I am aware of EL Essentials Prg´s Guide and Pages 96 onwards . Is there information available which leads beyond ?

Keywords such as "GetBDAccountEquity" and others are recognised in my PL-editor but do not compile or is it me doing a mistake ?

Thanks

Lobo

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: GetAccountID()

Postby Henry MultiСharts » 30 Jan 2012

Hello

would one friendly supporter please inform , where to find the respective manual which describes all "account & Positions" - functionality or include some/any code examples ? Still asking even though I am aware of EL Essentials Prg´s Guide and Pages 96 onwards . Is there information available which leads beyond ?

Keywords such as "GetBDAccountEquity" and others are recognised in my PL-editor but do not compile or is it me doing a mistake ?

Thanks

Lobo
Hello Lobo Trader,
"GetBDAccountEquity" as well as the other code words in purple are functions.
You can open it by making a right click on it->Open function.
GetBDAccountEquity function is not currently implemented.

Documentation for new reserved words in MC7 is available at this thread.
You can also move the pointer to the reserved word in the PowerLanguage editor, click F1 from your keyboard. The description along with the usage sample will appear on the Help tab of the PowerLanguage editor.


Return to “MultiCharts”