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:
        
        // 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());
          }
        }
        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 yeikson89, Today, 02:53 PM
        2 responses
        10 views
        0 likes
        Last Post yeikson89  
        Started by sdauteuil, Today, 01:06 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by trumpy, 03-09-2017, 02:11 PM
        30 responses
        3,224 views
        0 likes
        Last Post foxthorn  
        Started by shani77, Today, 09:58 AM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_Eleanore  
        Started by cjanau, Yesterday, 11:07 AM
        1 response
        31 views
        0 likes
        Last Post NinjaTrader_ThomasC  
        Working...
        X