Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Suggestion: Get account name, change account programmatically
Collapse
X
-
Suggestion: Get account name, change account programmatically
It's already a great improvement to be able to access the CashValue of the account, etc. However, it would also be nice to be able to access the name of the account. (I for example would need this to verify that the account is set to Sim101 when running a strategy in a special mode.) It would be even nicer to be able to programmatically change the account a strategy uses. This would enable a strategy to put itself in and out of simulation mode (e.g. after a losing streak, etc.).Tags: None
-
I just noticed that the name of the current account CAN be accessed programmatically (might not be supported though):
Now the questions is if there is any way to switch accounts programmatically too...Code:[FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][COLOR=black]Print(Account.Name);[/COLOR][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
Comment
-
you can do this already using the
Cbi.Accounts.FindByName() function.
Best regards
andreas
www.zweisteintrading.eu
ninjatinymobiletrader
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
605 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
351 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment