i am getting frustrated with this nonsense.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
requesting again to change default account
Collapse
X
-
requesting again to change default account
i am going to make the requst again to allow the user the ability to choose the trading account. half my trades goto the sim account becuase i forget to change the default when i setup my strategy.
i am getting frustrated with this nonsense.Tags: None
-
i run my ninja strategy thro the chart. all the parameters that i need for my strategy is customisable thro the api except the account. it is so painful that my strategies are going to paper instead of real account.
i could use a work around or something that i can hack quickly as it is affecting my bottomline.
Comment
-
then i would suggest that the ability to direct a target account for a strategy programatically or thro preferences would be a high or even highest priority feature.
remember, for all the power that NT has, it may end up with profits to the SIM trader which is of use to no one.
Comment
-
You might try something like the following...
Note: I found this stuff poking around in Ninjascript, and it is not supported, so if you use it you take the chance that it might not work or may change in a future release of NinjaTrader.Code:if (Account.Name != Connection.SimulationAccountName) { Alert( "SimDisplay", Priority.Low, "Warning: Strategy is being run in Simulation mode", "Alert1.wav", 1, Color.Aquamarine, Color.Black ); }
Comment
-
it works as is.
interestingly, reflection shows that the account has a get set property
Time 19:00:53:138
Thread 0x01
Traces Account
public class NinjaTrader.Cbi.Account
Properties
Id {get} e13590676f9049d9a751e52d8a21b902 public string
Name {get} {set} Sim101 public string
Simulation {get} {set} True public bool
Connection {get} {set} NinjaTrader.Cbi.Connection public NinjaTrader.Cbi.Connection
Currencies {get} NinjaTrader.Cbi.Currency[] public NinjaTrader.Cbi.Currency[]
Executions {get} NinjaTrader.Cbi.ExecutionCollection public NinjaTrader.Cbi.ExecutionCollection
LastUpdate {get} 25/02/2009 6:50:12 PM public System.DateTime
Orders {get} NinjaTrader.Cbi.OrderCollection public NinjaTrader.Cbi.OrderCollection
Positions {get} NinjaTrader.Cbi.PositionCollection public NinjaTrader.Cbi.PositionCollection
Strategies {get} NinjaTrader.Strategy.StrategyCollection public NinjaTrader.Strategy.StrategyCollection
UserData {get} {set} System.Xml.XmlDocument public System.Xml.XmlDocument
UserLink {get} {set} null public object
this [string memberName] {get} {set} [default] public [interface] object
has anyone tried to set to different account thro this. i am sure that the mods are going to say "its not supported".
Comment
-
I tried changing the value of "Account.Name" from "Sim101" to "test" (by assignment in the Initialize() method) and it caused NinjaTrader to crash/abort and the error message said something about the account not being "Sim101", so you're right "it's not supported", but who knows, it might work if you try it with a valid account name... but I'll let you be the guinea pig. Good luck.Originally posted by junkone View Posthas anyone tried to set to different account thro this. i am sure that the mods are going to say "its not supported".
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
80 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
46 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
66 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment