Coding: Account Margin used %

2
borgesr wrote:Dear Mladen,

How do I calculate if 20% of the account margin (AccountMargin()) has already been used?
If 20% of the margin has already been used do not release new orders.

Thank you,
Rogério
For any orders or just for the specific set of orders (created by specific EA, for example)?

Coding: Account Margin used %

4
borgesr wrote:Hi Mladen,
For orders that correspond to the magic number  created by specific EA.

Thank you,
Rogério
Not sure that it can be done - the way how brokers calculate the margin used when you open an order differs from broker to broker, so we do not have an universal way to "reconstruct" it for the moment when the order was opened, and, hence, we can not sum just a certain set of orders for that purpose




Who is online

Users browsing this forum: No registered users and 12 guests