Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto quantity entry

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

    Auto quantity entry

    Hello, I am brand spanking new to NinjaTrader (as in, today!), so please forgive me if this is a mundane question but I'm wondering if I can have the order quantity fill automatically based on a percentage of available funds.

    For example, suppose XYZ is selling at 61.34, I have $100000 buying power, and I want to order enough shares of XYZ such that I've used at least 51% of my buying power. So, I would enter 832 shares of XYZ. Can I automate this in Chart Trader? I am a proficient programmer, although I have yet to dig into NinjaTrader or NinjaScript; I'm just trying to determine the best jumping off point. Thanks!

    Bill

    #2
    Hello Bill,

    Welcome to the NinjaTrader Support Forums!

    Yes, you can do something like this but it would only be inside of a NinjaScript Strategy. You would not be able to do this inside of a SuperDOM or Chart Trader.

    Inside of a NinjaScript Strategy you set your Order Quantity to use an "Account Size" automatically have your strategy buy as many shares as your Account Size by changing this under the "Order Properties" section of the Strategy Parameters. To set a percentage you would have to manually code this.

    Since you are a programmer, if you like to start to learn NinjaScript, we have a section in our Help Guide that can get your started "Developing your Strategy" at the following link.


    Then you can have your Account Variable that you can setup to buy the number of shares the percentage your account could buy/sell.

    Let me know if you have any further questions.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks JC, I think this gets me pointed in the right direction!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      144 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      70 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      78 views
      0 likes
      Last Post PaulMohn  
      Working...
      X