Is it possible to determine the real-time margin usage for the entire account in a study?
For example, TS has GetRTInitialMargin() and GetRTMaintMargin(). Is there anything comparable that would work for GAIN Capital and Interactive Brokers in MC?
How to determine real-time margin usage?
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 140 times
Re: How to determine real-time margin usage?
Hello, firemag!
Margin values are not supplied for all brokers through their API, so for some of them (as is the case with GAIN) it won’t be possible to get this info from the code. IB do provide this info. Please refer to the following sample code to find the keywords associated with margin and other account info and examples of their usage. The corresponding info will be taken from the Order and Position Tracker -> Account tab.
Margin values are not supplied for all brokers through their API, so for some of them (as is the case with GAIN) it won’t be possible to get this info from the code. IB do provide this info. Please refer to the following sample code to find the keywords associated with margin and other account info and examples of their usage. The corresponding info will be taken from the Order and Position Tracker -> Account tab.
- Attachments
-
- AccountInfoFromOPT.pla
- (5.84 KiB) Downloaded 478 times