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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        70 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        78 views
        0 likes
        Last Post PaulMohn  
        Working...
        X