Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Max Position Size and Order Question

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

    Max Position Size and Order Question

    For NT7 I have 2 questions.

    1. In my strategy I'm using SetProfitTarget() to exit trades. If I'm using continuum data feed with NinjaTrader Brokerage, does this limit order rest on the brokerage servers or is it in the queue at the exchange?

    2. Is there a way to limit the total contracts the strategy can trade programmatically and that can't be overridden by the Order Properties Default Quantity in the edit strategy box.

    Thanks

    #2
    Hello superhaze421,

    Thank you for writing in.

    Please take a look at this particular forum post for more information about where orders reside depending on the order's state and the connection type used: http://ninjatrader.com/support/forum...ead.php?t=5349

    When submitting your orders (such as with EnterLong(), EnterShort(), etc.), you can programmatically modify the amount of contracts submitted.

    For example, if you use:
    Code:
    EnterLong(5);
    This code will send a long order for five contracts. This behavior cannot be modified unless the hard-coded value is modified from within the code itself.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      I did hard code the size using EnterLong(5, "signal");
      But if I load the strategy and under Order properties use "Set order quantity" to "by default quantity" and set 10 contracts for example it overrides the 5 that I programed. Just want it to limit # of contracts so users cant go above a certain # of contracts.

      Comment


        #4
        Hello superhaze421,

        Thank you for the clarification. It looks like I have misread your initial inquiry.

        You would be able to programmatically override this by checking and modifying the DefaultQuantity property: https://ninjatrader.com/support/help...ltquantity.htm

        As an example:
        Code:
        // if DefaultQuantity is more than 5, set DefaultQuantity to 5
        if (DefaultQuantity > 5)
             DefaultQuantity = 5;
        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          That works, thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mestor, 03-10-2023, 01:50 AM
          16 responses
          388 views
          0 likes
          Last Post z.franck  
          Started by rtwave, 04-12-2024, 09:30 AM
          4 responses
          31 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          29 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          22 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Working...
          X