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 cre8able, Today, 01:16 PM
          2 responses
          9 views
          0 likes
          Last Post cre8able  
          Started by chbruno, 04-24-2024, 04:10 PM
          3 responses
          48 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by samish18, Today, 01:01 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by WHICKED, Today, 12:56 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by WHICKED, Today, 12:45 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X