WorkCoding: Account Margin used %

#1
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


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


Re: Coding: Account Margin used %

#6
borgesr wrote:
Fri Feb 24, 2017 8:05 am
Is it possible to know what percentage of the margin used is independent of the order?

Thank you,
Rogério
You have the AccountMargin() and AccountFreeMargin() functions - those can be used for that


  1. Similar Topics

    1. Need coding help, if possible!

      2 Replies 837 Views

      by brenofguedes, Thu Mar 12, 2020 2:05 pm in Coding Help

      2 Replies
      837 Views
    2. Coding help please

      1 Replies 373 Views

      by Deez, Thu Nov 05, 2020 6:54 pm in Coding Help

      1 Replies
      373 Views

Return to “Coding Help”