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 PaulMohn, Today, 03:49 AM
      0 responses
      7 views
      0 likes
      Last Post PaulMohn  
      Started by inanazsocial, Today, 01:15 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by rocketman7, Today, 02:12 AM
      0 responses
      10 views
      0 likes
      Last Post rocketman7  
      Started by dustydbayer, Today, 01:59 AM
      0 responses
      4 views
      0 likes
      Last Post dustydbayer  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      5 responses
      23 views
      0 likes
      Last Post trilliantrader  
      Working...
      X