fxDreema

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

    Close all based on %?

    Questions & Answers
    3
    6
    1208
    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.
    • D
      draicos last edited by

      i can put this function in the costant tabel to have the possibility to change thi value in any moments?

      1 Reply Last reply Reply Quote 0
      • S
        smeden last edited by

        Hi
        Is it possible to close all orders when it reach a % based on the balance?

        Thanks

        1 Reply Last reply Reply Quote 0
        • fxDreema
          fxDreema last edited by

          Using **Condition **block to check when it's the moment to close them, and then use Close trades to actually close them... this sounds right to me. I guess Profit vs Balance should be compared in the Condition, with using Adjust filed in one of both sides.
          If you want to use the profit generated from a group of trades, then use Check current unrealized profit block. If you want to use the balance value somewhere, just write AccountBalance(). Here is a list of similar MQL4 functions: http://docs.mql4.com/account/accountbalance

          1 Reply Last reply Reply Quote 0
          • S
            smeden last edited by

            Hi
            I did try to use the Check current unrealized profit block
            But I can only do it in pips or $ amount I want to do it in % based on account balance.

            Can this be done?

            1 Reply Last reply Reply Quote 0
            • fxDreema
              fxDreema last edited by

              As i wrote above, AccountBalance() gives you the current balance value. It's a function, but you can imagine that it is a variable with () at the end. If the balance is 10000 then AccountBalance() will equal to 10000.

              AccountBalance()*10/100 = 10% of balance.

              1 Reply Last reply Reply Quote 0
              • S
                smeden last edited by

                ok..Hoped it could be dont without any programing. This is over my head 😞

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

                Online Users

                A
                M
                E
                A
                E
                N
                S

                14
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors