Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ISSUE: How to programattically discover the per-contract margin requirement?

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

    ISSUE: How to programattically discover the per-contract margin requirement?

    In NT7, one could find out the per-contract margin requirement by evaluating the expression Instrument.MasterInstrument.Margin. However, in NT8, there is no property named "Margin" defined in MasterInstrument, no obvious renaming of it, and no documentation of how to obtain this critical information.

    So how can this information be obtained programatically in NT8?
    Last edited by strategesis; 08-06-2015, 12:24 AM.

    #2
    NT8 risks/margins were completely over hauled and the master instrument object no longer contains margin information. These are defined in a "Risk template". You can review a risk template under Tools-> Risk.

    To get margin information for a particular instrument, you'll have to query the risk template and then pass in your master instrument

    Code:
    double myMaintenanceMargin = Risk.Get("NinjaTrader Brokerage Default").ByMasterInstrument[Instrument.MasterInstrument].MaintenanceMargin;
    We hope to have this documented by the open beta release.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    51 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    30 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    99 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    177 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    170 views
    0 likes
    Last Post CarlTrading  
    Working...
    X