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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
174 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
329 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
252 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
355 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
182 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment