Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order quantity in the code and in the strategy input menu

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

    order quantity in the code and in the strategy input menu

    i have a ninjascript that has the order quantity calculated from within the script via a typed-in starting account balance and a math calculation with profits for a compounding position size. when i load the strategy the menu for the strategy asks order handling\entries per direction. what should that be set at? and, does it override the code?
    Attached Files

    #2
    Hello SteveReiza,

    Thanks for your post.

    The 'Entry Handling' and 'Entries per direction' property values you use would be up to you to choose depending on how you want the strategy to behave.

    EntriesPerDirection and EntryHandling could be used to control the maximum number of entries allowed per direction while a position.

    From the help guide:

    "Sets the manner in how entry orders are handled. If set to "EntryHandling.AllEntries", NinjaScript will process all order entry methods until the maximum allowable entries set by the EntriesPerDirection property has been reached while in an open position. If set to "EntryHandling.UniqueEntries", NinjaScript will process order entry methods until the maximum allowable entries set by the EntriesPerDirection property per each uniquely named entry.​"

    An example of this would be if you set Entry Handling to EntryHandling.AllEntries, NinjaScript will process all entry order methods up to the maximum allowable entries set in the EntriesPerDirection property. For example, if you set EntriesPerDirection to 3 and use EntryHandling.AllEntries, up to a total of 3 entry orders will process.

    When you set Entry Handling to EntryHandling.UniqueEntries, NinjaScript will process order entry methods up to the maximum allowable entries set by the EntriesPerDirection property for each uniquely named entry. For example, if you have two entry order methods using unique signal names ("entry1" and "entry2"), set EntriesPerDirection to 3, and use EntryHandling.UniqueEntries, a maximum number of 3 entry orders will process for each uniquely named entry order (up to 3 orders for "entry1" and 3 orders for "entry2").

    If this is not a strategy that you created yourself, you could consider reaching out to the developer of the strategy for advice on what they recommend the Entry Handling and Entries Per Direction properties be set to.

    See the help guide documentation below for more information.

    Entry Handling: https://ninjatrader.com/support/help...ryhandling.htm
    Entries Per Direction: ​https://ninjatrader.com/support/help...rdirection.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      thanks for the reply. alright, sweet! i appreciate the explanation - big help!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      56 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      37 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      17 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      19 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      49 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X