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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        69 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        42 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        24 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        27 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X