fxDreema

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

    take profit %

    Questions & Answers
    3
    3
    472
    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
      diegoroman last edited by

      hello, when my EA open a new trade, I would like to put the take profit as a % of the open price of the trade. For example, if the EA open a long position on German index at the price of 11000 I want that my EA set the take profit at 5% of open price (550 pips of profit and then the take profit will be 11550 ).
      In the settings I found only the possibility to set the take profit as a % of the stop loss but it's not what I need.
      Can sombody help me to program it?

      1 Reply Last reply Reply Quote 0
      • M
        maurysvva last edited by

        You can setup a Formula: Open price x 0,05. Be careful to set up correctly pips or digits.

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

          Or you can put any calculation using native MQL4 functions here: http://prntscr.com/7hkq7t
          Because not everything in MQL4 is hard to do. For example, the Ask price can be get by simply writing Ask. Ask is predefined variable. Also Bid.
          http://docs.mql4.com/predefined/ask
          Some account data is also easy, for example AccountBalance() is giving us the current balance: http://docs.mql4.com/account/accountbalance

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

          Online Users

          J
          T
          J
          B
          A
          T
          M

          17
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors