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 r68cervera, Today, 05:29 AM
              0 responses
              2 views
              0 likes
              Last Post r68cervera  
              Started by geddyisodin, Today, 05:20 AM
              0 responses
              3 views
              0 likes
              Last Post geddyisodin  
              Started by JonesJoker, 04-22-2024, 12:23 PM
              6 responses
              35 views
              0 likes
              Last Post JonesJoker  
              Started by GussJ, 03-04-2020, 03:11 PM
              12 responses
              3,239 views
              0 likes
              Last Post Leafcutter  
              Started by AveryFlynn, Today, 04:57 AM
              0 responses
              6 views
              0 likes
              Last Post AveryFlynn  
              Working...
              X