How to determine real-time margin usage?

Questions about MultiCharts and user contributed studies.
Posts: 41
Joined: 15 Sep 2017
Has thanked: 8 times
Been thanked: 2 times

How to determine real-time margin usage?

Postby firemag » 15 Jan 2018

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?

User avatar
Anna MultiCharts
Posts: 311
Joined: 14 Jul 2017
Has thanked: 26 times
Been thanked: 75 times

Re: How to determine real-time margin usage?

Postby Anna MultiCharts » 18 Jan 2018

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.
(5.84 KiB) Downloaded 188 times
These users thanked the author Anna MultiCharts for the post:

Return to “MultiCharts”