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 CarlTrading, 03-31-2026, 09:41 PM
            1 response
            155 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            90 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            137 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            130 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            107 views
            0 likes
            Last Post CarlTrading  
            Working...
            X