So how can this information be obtained programatically in NT8?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ISSUE: How to programattically discover the per-contract margin requirement?
Collapse
X
-
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. -
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
We hope to have this documented by the open beta release.Code:double myMaintenanceMargin = Risk.Get("NinjaTrader Brokerage Default").ByMasterInstrument[Instrument.MasterInstrument].MaintenanceMargin;MatthewNinjaTrader Product Management
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, Yesterday, 09:41 PM
|
1 response
14 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
31 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
30 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
34 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
19 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|

Comment