fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. rpelliciari
    3. Posts
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by rpelliciari

    • RE: balance / equity and free margin zero until finish trade

      Ok, I already solved this situation. It was a pretty simple solution, for instance.

      Basing on this article, we have to start an EA instance the values for "balance", "equity" and "free margin". That is the same value, thinking about an EA initialization.
      ( http://www.luckscout.com/leverage-margi ... x-trading/ )

      From this way, all that we need to do is use our "onInit()" abstract EA method and setup the variables basing on a new static double variable.
      And thats it ! See ya !

      ......
      margin operations.png

      posted in Questions & Answers
      R
      rpelliciari
    • RE: balance / equity and free margin zero until finish trade

      I got it. Basing on MQL5 API we have a method called "AccountFreeMargin()" that returns a double value that can be handled.
      Basing on this, is it possible to declare a fixed Free Margin as a variable or something like this ?

      Thanks !

      posted in Questions & Answers
      R
      rpelliciari
    • RE: balance / equity and free margin zero until finish trade

      Hi.
      Using my MT5 release provided by my Broker, the values for balance / equity and free margin remains zero all time until the trade not finish.
      For example, if I got $ 100 of profit during a succesfully closed trade I will have $ 100 available for balance / equity and free margin. And so on...
      But, thinking about an EA execution, can this cause some issues to start a trade ?

      I dont have in my code any money mgmt block basing on my balance. Can I face some issue from this way to start a trade through an EA ?
      Can my EA understand that there isn't funds to start a trade transaction ?

      Thanks guys !

      Ricardo Pelliciari.

      posted in Questions & Answers
      R
      rpelliciari
    • 1 / 1