Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Dynamic Account Value?

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

    Dynamic Account Value?

    I read in the docs that AccountSize is dynamic when SetOrderSize:ByAccountSize but i'm finding that my AccountSize isn't updating. Am I doing something wrong or do I need to calc it myself?

    TIA

    #2
    Please ensure you are actually using ByAccountSize. Otherwise you will need to self calculate.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I'm pretty sure i have it set as advised.

      In the order properties of strategy dialog:

      Account size:10000
      Set order quantity: by account size
      Time in force: Gtc

      The strategy is running live sim, update on close = true.
      I'm specifying order size in the strategy with integer quantities.
      On every OnBarUpdate() it Print() realtime p/l and AccountSize. The realtime p/l is updating but the AccountSize doesn't seem to change.

      Comment


        #4
        darckeen,

        When you use account size for your order placement it should not care what integer quantity you place and instead always try to max out the number of shares by account size. Please confirm you are seeing this behavior to ensure you have the correct settings.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Naw the orders are going in according to what I set as the integer size as.

          if (Close[0] > sma[0]) EnterLong(tradeinc,"entry");
          else EnterShort(tradeinc,"entry");

          Comment


            #6
            darckeen,

            Please use an instance of your strategy where you are not using the integer quantities and leave that up to ByAccountSize to determine. That should solve your issue.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              kk thanks Josh

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Haiasi, Today, 06:53 PM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by ScottWalsh, Today, 06:52 PM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by ScottW, Today, 06:09 PM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by ftsc2022, 10-25-2022, 12:03 PM
              5 responses
              256 views
              0 likes
              Last Post KeyonMatthews  
              Started by Board game geek, 10-29-2023, 12:00 PM
              14 responses
              244 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Working...
              X