Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Min/Max Lot size

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

    Get Min/Max Lot size

    Hello,

    Im new in NT programming. How can I get min/max lot (unit, quantity etc..) like MT4?
    MarketInfo(Symbol(), MODE_MINLOT);

    How to get Account size in backtest? I'd like to code risk base strategy, but in GetAccountValue(AccountItem.CashValue) put always 0 in backtest.

    thanks,
    Bandito

    #2
    Welcome to our forums. The account size could unfortunately not be accessed in backtesting, it would 0 here as you experienced. Only in realtime / simulation operation you can pull the actual value for calculations. But you can set a custom variable with your desired size and update as needed then.

    I'm not familiar with the MarketInfo method - would details would you seek to get access to here?

    Comment


      #3
      Ok, I can get informations in MT4 trough MarketInfo() function.
      I'd like to get minimum Lot size. I think in NT is quantity.
      1 Lot = 100000 quantity

      How to get this min/max quantity for actual symbol?

      Comment


        #4
        I see thanks - this would be unfortunately not directly exposed for access, it will vary per brokerage technology used. What are you working with?

        Comment


          #5
          I'd like to use this min/max thing to error filtering. For example: If I EnterLong(10000) good for X symbol, but I've error on Y symbol.
          Is there any other way to error handling?

          Comment


            #6
            There would be unfortunately no way to query this qty's - for the error handling you can get the rejection in OnOrderUpdate() and could then for example resubmit - http://www.ninjatrader.com/support/h...=OnOrderUpdate

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            639 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            366 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            107 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            569 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            572 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X