Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Maximizing the Order quantity

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

    Maximizing the Order quantity

    Hello,

    I was wondering if there is a way to tell a strategy to always use the maximum order quantity possible each time it does a trade?

    Thank you!

    Francis

    #2
    fladou246, the question would be more like from what that order qty amount was derived I think. From the UI we have an option to calculate that size ByAccountSize for example, you can pass in your available equity for this script and based on the margins defined for this instrument -> it will calculate the max amount to use then.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hey,

      Ok, I tried it and Backtested it but it does not take in consideration profit . For example, if I put :
      {
      AccountSize = 4000;
      }
      , it will always enter with order quantity = 4 with the backtest Even if I made profit and my account is at 8000$. Would it take profit in consideration in realtime trading?

      Also, I have Interactive broker for API and the margin for the instrument I tested is aproxmatly 3500$ for 1 order (with Interactive broker) but ninja seems (in the backtesting) to give a margin of 1000$ per contract. When Ill test in realtime my order will probably be rejected?

      thank you very much

      Francis

      Comment


        #4
        Francis, correctly observed it would not cumulate profits in, it provides a means to calculate size by a specified fixed account size. If you want to work with higher margins you can set them as desired via the Instrument Manager master instrument definitions.

        What you can do for realtime is accessing the actual value of your traded to account via GetAccountValue() and use it for calculating an order size for your entries.

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        57 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Today, 06:52 PM
        4 responses
        35 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Today, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Today, 03:01 PM
        2 responses
        19 views
        0 likes
        Last Post helpwanted  
        Started by cre8able, Today, 07:24 PM
        0 responses
        9 views
        0 likes
        Last Post cre8able  
        Working...
        X