Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

call excessMargin

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

    call excessMargin

    Well this is my plan.

    Run three concurrent strategies. Trading corn, soybeans, and wheat futures. Due to margin differences I would like a way to calculate against my excess margin. Were I to calculate against my account only one of the three strategies would try to take all the money for it's own purposes. And then the other two would error out due to "not enough funds to trade".

    If it was based off of excessMargin though then corn would take the maxContractsCorn, say 5. Leave xxxxx funds left over. Then soybeans would take up to maxContractsSoybeans, say 3 or so. Then wheat would take as much margin as it could up to it's max. Leaving a buffer to ride out short term stop-losses. Also allowing the script to automatically start using more funds as they become available.

    Edit: I guess also, is there a way to tell the script how much margin is per given contract. That way it can do

    marginExcess/soybeansMargin = soybeansTraded;
    soybeansTraded =< maxsoybeansTraded;
    maxsoybeansTraded = 3;

    Is this possible in NT scripting?


    Thanks,
    Rhy.
    Last edited by Rhyshaelkan; 08-07-2009, 08:02 PM.

    #2
    Rhy, thanks for the post - yes you can set the used margin per product in the Instrument Manager, but unfortunately you would still need to access your live account info to allocate free margin as you lined out. This is not possible with NinjaTrader 6.5, but it will be in NinjaTrader 7 (level of detail depending on which brokerage technology you use) -

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    587 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    341 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    555 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X