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 dbennett3, Today, 01:59 PM
      0 responses
      1 view
      0 likes
      Last Post dbennett3  
      Started by webus, Today, 06:22 AM
      4 responses
      18 views
      0 likes
      Last Post webus
      by webus
       
      Started by DerkWehler, Today, 11:35 AM
      8 responses
      18 views
      0 likes
      Last Post DerkWehler  
      Started by DayTradingDEMON, 07-11-2024, 08:54 AM
      16 responses
      48 views
      0 likes
      Last Post DayTradingDEMON  
      Started by DawnTreader, 05-08-2024, 05:58 PM
      41 responses
      279 views
      0 likes
      Last Post DawnTreader  
      Working...
      X