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
    Brandon H.NinjaTrader Customer Service

    Comment


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mathias79, Today, 10:38 AM
      5 responses
      16 views
      0 likes
      Last Post Mathias79  
      Started by Skifree, Yesterday, 11:41 PM
      2 responses
      13 views
      1 like
      Last Post eDanny
      by eDanny
       
      Started by TraderCro, 04-12-2024, 11:36 AM
      8 responses
      105 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by synthhokie, Today, 10:24 AM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by eladlevi, Today, 11:02 AM
      0 responses
      4 views
      0 likes
      Last Post eladlevi  
      Working...
      X