fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    fxDreema Problem check profit

    Questions & Answers
    2
    2
    992
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sevdarko last edited by

      I am currently working on a script to close all open trades.
      I always activate this manually if all my open trades in their total sum have gained 1.5% of my capital. It works quite well, but I wanted to automate this step in an EA. Have been experimenting for over a week and searched the forum to find something suitable, but to no avail.
      Have experimented as follows, but after closing the trades often came out a minus. Please be so good and post here a fitting example of what this task exactly fulfilled.

      example
      Trade 1 -12.25
      Trade 2 + 5.25
      Trade 3 +17.00
      ...........................
      Total 10.00

      In the following article this example was mentioned
      https://fxdreema.com/forum/topic/5726/profit-for-all-trades/3

      fxDreema ADMINISTRATORS
      April 10, 2018, 8:39 pm

      There is no option, but the option is in money. As you probably know, you can use native MQL functions in all input fields. So the default value is 0, but you can put something like:
      AccountBalance () * 3/100.
      AccountBalance () gives you the current Balance, the amount of money you had before opening the trades. Let's say that the balance is 1000, then 1000 * 3/100 equals to 30 (dollars) 🙂

      How can I implement this, where do I have to write this in, because I tried this but there was always an error

      Thanks in advance
      sevdarko

      Sorry googletranslate

      J 1 Reply Last reply Reply Quote 0
      • J
        johnle1024 @sevdarko last edited by

        @sevdarko Hi, this should work:

        https://fxdreema.com/shared/BjWe39Kkb

        Just check the box next to the money filter so you can input the dollar amount each time, I am guessing that you don't want to have to sit around and monitor the trades after you make them. This should do it?

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        Online Users

        C
        S
        P
        T
        I
        B
        A
        H
        E

        19
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors