How to determine real-time margin usage?

Questions about MultiCharts and user contributed studies.
firemag
Posts: 43
Joined: 15 Sep 2017
Has thanked: 9 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: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 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.
Attachments
AccountInfoFromOPT.pla
(5.84 KiB) Downloaded 478 times


Return to “MultiCharts”