fxDreema

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

    Modify TP including swap & Mt4 Crash

    Questions & Answers
    2
    8
    333
    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.
    • C
      Crisfx last edited by Crisfx

      Hi guys, I'm looking for a way to modify the take profit of one or more trades just after midnight (using the time filter command), increasing or decreasing it by X pips based on the swap (if positive or negative).

      Another question: if the metatrader is closed by mistake, when it is reopened all the charts with the expert advisor inside are loaded, are the trades already opened by him recognized? Because it seems to me that using "pips away from open price" the ea only recognizes the last open trade, not the "original" one. Same thing using the check profit unrealized function, I think that if the metatrader is closed by mistake, the check profit no longer recognizes the "group" with the trades. Has this happened to anyone before?

      I've read many topics but none of them exactly answer these questions.

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

        With pips away, in the for each trade block you choose the number of the trade you are referencing, don't think removing/adding/closing makes a difference.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        C 1 Reply Last reply Reply Quote 0
        • C
          Crisfx @jstap last edited by Crisfx

          @jstap I'm not using for each trade. My setup is: IF trade / pips away from price / once per trade / add to volume.
          The reason is that there are different pips away from open price with different distances. For example:
          Original trade: open at price 11 (ticked id 1)
          first pips away -30 pips, open at price 8 (p=1) with add to volume x1.2
          second pips away -40 pips, open at price 4 (p=1) with add to volume x1.3

          If the metatrader is closed and reopened and there are already 3 open trades (original + 2 pips away) it happens that the EA will open a trade after -30 pips from the LAST trade he sees, i.e. the "second pips away -40 pips, opened at price 4", with add to volume x1.2 but with reference p=1. It is as if the "pips away" count started all over again starting from the last pips away opened, using the correct ticked id (p=1) but with the same add to volume as the FIRST first pips away (opened at price 8 with add to volume x1.2 ). This is very strange.

          The result is this:
          Original trade: opened at price 11 (ticked id 1) with add to volume x1.2
          first pips away -30 pips, open at price 8 (p=1) with add to volume x1.2
          second pips away -40 pips, open at price 4 (p=1) with add to volume x1.3
          -> close and restart the metatrader and this happens:
          At price 1 he will open a new trade with add to volume x1.2 and ticked p=1.

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

            pips away only works correctly under for each block, needs this to select the trade you want to work from.

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Don’t miss out

            Click here➡️ https://mybook.to/fxDreema to get your copy today!

            Enjoy! 😊

            C 1 Reply Last reply Reply Quote 1
            • C
              Crisfx @jstap last edited by

              @jstap They have always worked very well for me. If I wanted to use for each trade as you suggest, how would I do the same thing? Now I use IF trade / pips away from price / once per trade / add to volume. Also, are you sure that in case of crash or closure of MT4 all trades are recognized without losing the count as it happens now?

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

                Just put the for each above pips away, it will use this block to select the trade to work from.

                Learn fxDreema Without the Wait!

                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                Don’t miss out

                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                Enjoy! 😊

                C 1 Reply Last reply Reply Quote 0
                • C
                  Crisfx @jstap last edited by

                  @jstap Ok, I'll try, but in case of accidental closure of the Metatrader, how will the EA know which "for each trade" to restart from?

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

                    The trade numbers don't change.

                    Learn fxDreema Without the Wait!

                    My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                    The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                    Don’t miss out

                    Click here➡️ https://mybook.to/fxDreema to get your copy today!

                    Enjoy! 😊

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

                    Online Users

                    A
                    L
                    S

                    19
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors