Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

requesting again to change default account

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Thanks for the input junkone, we appreciate it - are you running NinjaScript strategies or external ones through the ATI? For the ATI you could set the default account under Tools > Options > ATI. Thanks!
    BertrandNinjaTrader Customer Service

    Comment


      #3
      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


        #4
        Hi junkone, I see - if 'Global Simulation Mode' is turned off, it should normally select your live account as default.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          i dont think so. pl see attached screenshots
          Attached Files

          Comment


            #6
            I'm sorry, then there's unfortunately no other way currently as to remember to select the live account when 'arming' the strategies for the trading day.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              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


                #8
                I certainly see your point and will make sure to forward this input to our developement team.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  You might try something like the following...

                  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 );
                  }
                  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.

                  Comment


                    #10
                    thanks a lot. i will give it a shot.

                    Comment


                      #11
                      Please note that I didn't actually try this code (but I think it should work as-is).

                      Please let us know if it works for you.

                      Thanks.

                      Comment


                        #12
                        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


                          #13
                          Originally posted by junkone View Post
                          has anyone tried to set to different account thro this. i am sure that the mods are going to say "its not supported".
                          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.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by cls71, Today, 04:45 AM
                          0 responses
                          1 view
                          0 likes
                          Last Post cls71
                          by cls71
                           
                          Started by mjairg, 07-20-2023, 11:57 PM
                          3 responses
                          213 views
                          1 like
                          Last Post PaulMohn  
                          Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                          4 responses
                          544 views
                          0 likes
                          Last Post PaulMohn  
                          Started by GLFX005, Today, 03:23 AM
                          0 responses
                          3 views
                          0 likes
                          Last Post GLFX005
                          by GLFX005
                           
                          Started by XXtrader, Yesterday, 11:30 PM
                          2 responses
                          12 views
                          0 likes
                          Last Post XXtrader  
                          Working...
                          X