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
Code:double myMaintenanceMargin = Risk.Get("NinjaTrader Brokerage Default").ByMasterInstrument[Instrument.MasterInstrument].MaintenanceMargin;
MatthewNinjaTrader Product Management
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rocketman7, Today, 09:41 AM
|
3 responses
7 views
0 likes
|
Last Post Today, 10:07 AM | ||
Started by traderqz, Today, 09:44 AM
|
2 responses
4 views
0 likes
|
Last Post Today, 10:00 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
8 responses
40 views
0 likes
|
Last Post
by stafe
Today, 10:00 AM
|
||
Started by rocketman7, Today, 02:12 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 09:23 AM | ||
Started by guillembm, Yesterday, 11:25 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 09:11 AM |
Comment