Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamic Order Sizing

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

    Dynamic Order Sizing

    Does anyone have a sample of some code that would in effect

    1. Get account balance
    2. Divide by X
    3. use result to decide number of shares/contracts to trade

    something like private double tradeEntryQty = _____________

    so that when I use it to enter a trade it looks something like-
    EnterLong(tradeEntryQty, "");

    I am hoping to get something that will update dynamically as trades are taken and account balance changes.
    Thanks!

    #2
    Hello Adam, would unfortunately not have a full sample here for this task, however for the Account value access in realtime trading you can use http://www.ninjatrader.com/support/h...sub=GetAccount

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    626 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    562 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    567 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X