fxDreema

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

    Find orders

    Questions & Answers
    6
    43
    8301
    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.
    • S
      seemab last edited by

      @roar And i am using this on Mt4 platform
      0_1589660795942_5.jpg

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

        @seemab said in Find orders:

        @roar As in your picture ( the terminal is having profit of 136 dollars ) and 1 trade is in -1 dollar, ( so the profit of the total trades is 136 dollars ) but the comment of chart is showing 137 dollars.
        I need only profit of trades which are in profit not all the trades.

        This doesnt make sense. 137 dollars is the profit-only trades, just as you wanted. I can check that you copied it right, if you send the shared link

        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
        • S
          seemab last edited by

          @roar this is the link and i have created an Area with your name title in which your given blocks are used.
          https://fxdreema.com/shared/yBQtRfQud

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

            @seemab you must reset the totalprofit variable before the EA calculates it again, otherwise it stacks values of each calculation
            0_1589692078201_2bcdc70d-1a5c-4dbc-a78d-2e62426c144a-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
            • S
              seemab last edited by

              @roar thank you so much it's working now. i set it 0.
              But now i am stuck in a simple variable calculation.
              https://fxdreema.com/shared/LRz503fUc
              In this i have added an area need help where i need help.
              When bucket of trades are closed i get there profit in variable A every time.
              Now i want to add previous A profit value in next profit A value every time when trades are closed and get results in B variable. Please if you can help.

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

                @seemab These blocks will be run on every new tick, not just when there happens some trade action. Check the On Trade tab, there are launching blocks to activate only when a trade is closed, maybe that gets you forward.
                0_1589858587680_4a1a5edf-174e-4cf5-8be1-aec6d2056f86-image.png

                Sorry Timmyhanke for hijacking your thread lol

                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
                • S
                  seemab last edited by

                  @roar i have tried it also on trade event but still not when trades are closed it's increasing the values in B variable not giving as it should be, even i have reset the A variable too 0 after updating it.
                  Please have look on it and give any ideas, i will be appreciating your help.
                  https://fxdreema.com/shared/m2bWPVFgb

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

                    @seemab ok, what are you trying to do?
                    You have 2 groups (buckets) of trades, and you want to know their combined profit? Is this the net profit or only the positive trades?

                    What is the final purpose of all this? Maybe I'll know some different approach

                    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
                    • S
                      seemab last edited by

                      @roar in bucket of trades i am collecting profit of only last 2 trades which are closed ( 1 from top buy trade and 1 from bottom buy trade ) and give it's result in variable A as total profit of both trades ( in this top trade -1 dollars and bottom trade +3 dollars so, 3-1 = 2 = value in A variable). Now as i get A variable value 2, and when next 2 trades which will be closed 1 top and 1 bottom give collect it's value and update in A variable as well add previous profit value which was 2 in current profit value may it can 5 or 10 or 2 what ever it is.

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

                        @roar ( completing reply here ) and what ever it is, and update results in B variable, So like this every time A will be updatings profits of closeds trades and adding also previous profits which are in B variable now and giving results in B variable.

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

                          @seemab you are thinking in terms of top and bottom buy trades, but the EA doesnt separate them as such. It makes the calculations every time some trade is closed, not when a pair of 2 trades is closed.

                          So your goal is to track total profits in variable "B"?

                          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
                          • S
                            seemab last edited by

                            @roar yes my goal is too get total profit in variable B, for top and bottom buy trades i am already getting there profit no problem for now. Problem is when i get there profit in variable A and want too add them in previous profit which i got in last closed. It keep adding it not only once.
                            In simple 1st time closed trades profit = 2 in variable A.
                            Now the value will be same also in variable B because this is 1st close of trades.
                            Now when 2nd time trades close there profit is 5 dollars.
                            Now i want too add 2 in this current updated profit which i get in A variable and give results in B variable.
                            Previously B was same as A value, now previous B = 2 and current A = 5 = 2+5 = 7 in variable B.
                            When 3rd close happens A get update value of 7 dollars.
                            So now we have B = 7 + 7 = 14 in variable B. And So until it hit block close all trades.

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

                              @seemab said in Find orders:

                              @roar yes my goal is too get total profit in variable B, for top and bottom buy trades i am already getting there profit no problem for now.

                              I dont think you are getting the right profit amouts.

                              You need a nice pair of top and bottom trades, and then sum their profits:
                              0_1589882903412_df684d58-a787-4a16-8361-abd540e1f164-image.png
                              But in reality, the "bucket of trades" will always take 2 history trades when some trade closes, so every trade will be recorded twice:
                              0_1589882976205_c4f43e4a-eafa-4faf-a76b-2f90598b6a4a-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
                              • S
                                seemab last edited by

                                @roar i know this this will happen in future when many trades will be closing but please currently i only need this.
                                I get some value in A, and A updates every time with new value when trades are closed.
                                So whenever new value is updated in A variable add previous value of A and update in B variable. simple calculation for now only.

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

                                  @seemab you are already doing that
                                  0_1589888504737_ba027a23-0cb1-4cf5-af63-6e6cb34d9028-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
                                  • S
                                    seemab last edited by

                                    @roar
                                    But it's not working correctly, it keep's adding after every trade or closed but it's not giving right value, i am confuse on it.

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

                                      @seemab again, why do you need this pairing of 2 trades? Try setting the bucket to only 1 trade, does that work for you?
                                      0_1589904718691_3c617fe7-9cc0-4a78-b306-eeae4cc51de2-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
                                      • S
                                        seemab last edited by

                                        @roar can you please tell me, if A variable get updated every trade even 1 trade in bucket of trades we just get the value in A.
                                        Now simply add previous A value in A current updated value and give results in B.
                                        How too do this ?

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

                                          @seemab you need A, B and C for that.

                                          When a trade closes, put old contents of A into B. Then update A with new info. Then set C = A + B + C

                                          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
                                          • S
                                            seemab last edited by

                                            @roar any blocks example please.

                                            roar 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post

                                            Online Users

                                            O
                                            J
                                            B

                                            20
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors