fxDreema

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

    Calculate EA profit every time EA Restart in same day

    Questions & Answers
    3
    8
    594
    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.
    • T
      trdjb3 last edited by

      Hi.

      Mto EA have a feature to close ALL positions and pending orders when specific profit or Loss is reached. This is easy to do using bucket os orders or For each closed position, when I run EA Just once a day. The problem is that, when my EA is closed, It Restart in same day (lets call cycle 2). And now I.need to calculate the specific profit/equity from this cycle after EA start again. How can this be achieved?

      B.R.

      G 1 Reply Last reply Reply Quote 0
      • G
        GTOAT777 @trdjb3 last edited by

        @trdjb3 I’m no expert (yet!) but couldn’t you add two sets of time filters 1 for cycle 1 and 2 and duplicate the blocks to each time filter. So the EA automatically calculates for timed session

        1 Reply Last reply Reply Quote 0
        • T
          trdjb3 last edited by

          HI

          Thank you for your reply. I cant use arbitrary time, i need to calculate exactly from the moment EA starts again (that depends if it is closed during day with Profit os loss), understand?

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

            @trdjb3 https://fxdreema.com/shared/Qc1ep8eDb in here you will see how to save details into a txt file and then read, you will need to reset when finished with data.

            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
            • T
              trdjb3 last edited by

              Thank you for your reply. This is a litle complex to me for now.

              I found this post:

              https://fxdreema.com/shared/6N55Sodxd

              I'm triyng to do the same, store timestamp (after close all orders) in a variable, and then using this variable inside a bucket of closed positions, should it work, right? (it is not in my tests)

              Here an example:

              https://fxdreema.com/shared/kr9bPrDge

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

                @trdjb3 This will work while the EA is left on as soon as removed it will loose data, you could use terminal (global) variables to save a number, not well practiced at this but you can do with standard blocks, save with terminal variables in output and communication-read with a condition block.

                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
                • T
                  trdjb3 last edited by

                  Hi.

                  I undererood what you said, but in this case EA Will not be removed. Only Will start again with New orders. I can print in chart the time (as a number) so I know that the data is being stored in the New EA cycle variable, but It seams that this number is not recognized by bucket of orders as a valid time. Maybe bucket of orders dont accept time as a number?

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

                    @trdjb3 If the EA is staying on chart, you can put value in a variable then read when necessary, put your variables in a comment so you can check what is happening.

                    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

                    M
                    M
                    C
                    N

                    20
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors