fxDreema

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

    Get the balance from the history tab ?

    Questions & Answers
    5
    19
    3374
    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.
    • F
      fabiobioware last edited by

      Hello admin from fxdreema @fxdreema, I would like as a last chance to know how to print on the screen using the block "coment" the value of the sum of the "Profit" field that is in the "history" tab
      I marked in red in the image exactly what and where I want it, is this possible? if so can you guide me on how to do it?
      I have tried in countless ways and failed.0_1583113834828_History and Profit.PNG

      roar 1 Reply Last reply Reply Quote 0
      • roar
        roar @fabiobioware last edited by

        @fabiobioware Does your history tab select profit from today, last week, last month, or life-time?

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        T F 2 Replies Last reply Reply Quote 0
        • T
          trader.philipps @roar last edited by

          @roar Does that matter? OrdersHistoryTotal() can only return what is selected on the history tab.

          I like to share my knowledge, but expect the others to contribute as well.

          roar 1 Reply Last reply Reply Quote 0
          • roar
            roar @trader.philipps last edited by

            @trader-philipps Oh, right, OrdersHistoryTotal() is the way to go here!

            I was thinking about the total lifetime profit so that he could put AccountBalance() to OnInit tab and then run it again in OnTick to get the difference

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            1 Reply Last reply Reply Quote 1
            • F
              fabiobioware @roar last edited by

              @roar The profit I want to check is daily.
              For this I am filtering on the metatrader itself.
              The problem is that this balance appears on the screen.

              roar fxDreema 2 Replies Last reply Reply Quote 0
              • roar
                roar @fabiobioware last edited by

                @fabiobioware Store your balance in a variable once per day, and then compare your current balance to that variable:
                https://fxdreema.com/shared/gCCnR5R6d

                Need small help? Tag me in your post
                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                1 Reply Last reply Reply Quote 0
                • F
                  fabiobioware last edited by

                  @roar said in Get the balance from the history tab ?:

                  Store your balance in a variable once per day, and then compare your current balance to that variable

                  @roar Did not work.
                  Follows the screen image.0_1583151615138_dailyprofit.PNG

                  https://fxdreema.com/shared/34isZF98c

                  roar 1 Reply Last reply Reply Quote 0
                  • roar
                    roar @fabiobioware last edited by

                    @fabiobioware it only works with the future trades, it doesn't check the history before the EA.

                    If you need to check the history, you have to use the OrdersHistoryTotal() functions.

                    Need small help? Tag me in your post
                    Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                    1 Reply Last reply Reply Quote 0
                    • F
                      fabiobioware last edited by

                      @roar said in Get the balance from the history tab ?:

                      OrdersHistoryTotal() functions

                      0_1583157251856_comparebalance.PNG

                      Correct @roar

                      1 Reply Last reply Reply Quote 0
                      • F
                        fabiobioware last edited by

                        @roar is the configuration correct?

                        replace OrdersHistoryTotal() with OrdersHistoryTotal() functions ?

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          fabiobioware @fabiobioware last edited by

                          @roar or use OrdersHistoryTotal() functions - startbalance ?

                          T 1 Reply Last reply Reply Quote 0
                          • T
                            trader.philipps @fabiobioware last edited by

                            @fabiobioware OrdersHistoryTotal() is the function @roar meant. Without the word function!

                            I like to share my knowledge, but expect the others to contribute as well.

                            1 Reply Last reply Reply Quote 0
                            • F
                              fabiobioware last edited by

                              @trader-philipps said in Get the balance from the history tab ?:

                              @fabiobioware OrdersHistoryTotal() is the function @roar meant. Without the word function!

                              @roar and @trader-philipps I tested the first one and it seems to be working, but now I want to take the amount that he printed on the screen and multiply it by the number 5 and he is not performing the account correctly, can you tell me how to do it ?? follow the print of how I'm trying to do.0_1583164460524_fORMULA.PNG

                              roar 1 Reply Last reply Reply Quote 0
                              • roar
                                roar @fabiobioware last edited by

                                @fabiobioware If you want to multiply the intraday profit, just copy-paste that whole string of code into the formula field.
                                0_1583164745518_4f17795c-326c-4722-a60d-ef24e80fb631-image.png

                                Need small help? Tag me in your post
                                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                                1 Reply Last reply Reply Quote 0
                                • F
                                  fabiobioware last edited by

                                  @roar said in Get the balance from the history tab ?:

                                  If you want to multiply the intraday profit, just copy-paste that whole string of code into the formula field.

                                  ok nowwww @roar 0_1583165553482_okkkkk.PNG

                                  Thank you very much @roar and @trader-philipps for help me in this resolution.

                                  F 1 Reply Last reply Reply Quote 1
                                  • F
                                    fabiobioware @fabiobioware last edited by

                                    @roar @trader-philipps one last question:
                                    I noticed that the numbers are appearing in the double format, even though I put int in the variables and constants, I need the numbers to be integers.

                                    example: in the image is 1199.0
                                    i need 1199 to appear only .0 should not appear, how can i make this happen ??

                                    0_1583172909517_intordouble.PNG

                                    roar 1 Reply Last reply Reply Quote 0
                                    • roar
                                      roar @fabiobioware last edited by

                                      @fabiobioware Dont know why this happens, maybe the comment block adds the decimal.. You can try the MathRound function: in your comment field, put
                                      MathRound(comment)

                                      Need small help? Tag me in your post
                                      Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

                                        @fabiobioware said in Get the balance from the history tab ?:

                                        @roar The profit I want to check is daily.
                                        For this I am filtering on the metatrader itself.
                                        The problem is that this balance appears on the screen.

                                        For the daily profits I made this block "Check profit (period of time)". As it name suggests, it checks the profit that is made in certain period of time. There are Time 1 and Time 2. By default Time 1 is 00:00 at the current day and Time 2 is the current time.

                                        1 Reply Last reply Reply Quote 0
                                        • E
                                          eks last edited by

                                          @fabiobioware I followed the examples above and did not succeed in seeing the balance closed. Could you share the example of the finished project?

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

                                          Online Users

                                          N
                                          S
                                          T
                                          A
                                          Y
                                          H
                                          B

                                          21
                                          Online

                                          146.7k
                                          Users

                                          22.4k
                                          Topics

                                          122.6k
                                          Posts

                                          Powered by NodeBB Forums | Contributors