Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DefaultQuantity (what is the default, and where to set it)

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

    DefaultQuantity (what is the default, and where to set it)

    What is the DefaultQuantity (the lot size) if I am trading in the forex? And where to set it? (see the screenshot in the strategy builder where DefaultQuantity appears)


    #2
    Thank you for your question jack1234. According to the documentation,

    Originally posted by http://ninjatrader.com/support/helpGuides/nt8/en-us/?defaultquantity.htm
    An int value represents the number of contracts or shares to enter a position with. Default value is 1.

    The way to enter a lot is going to be provider and account dependent. You will need to contact them to see whether 1 means "one micro lot" or "one unit".


    You can not set DefaultQuantity through the strategy wizard. The attached picture shows how to use quantities other than 1.
    Attached Files
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      What should I do if I want to set to 6 standard lots (600k)? (preferably to be broker independent)

      Comment


        #4
        Since different brokerages are going to have different rules as far as how quantities are specified there is no way through the Strategy Builder to create a brokerage independent strategy. If you are willing to unlock your code, this snippet will help you differentiate between connections and will in turn allow you to hard code any brokerage dependent variables.

        Code:
        [FONT=Courier New]
        // http://ninjatrader.com/support/helpGuides/nt8/en-us/connection_class.htm
        lock(Connection.Connections)
        {
          foreach(Connection c in Connection.Connections)
          {
            Print(c.Options.Provider.ToString());
          }
        }[/FONT]
        If you know that 600000 is 6 lots according to your broker you can simply change the value in the rightmost green circle to 600000.
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        76 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        146 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        79 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        50 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        54 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X