fxDreema

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

    self updating/refreshing grid, compare two groups of trades

    Questions & Answers
    10
    449
    423928
    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.
    • R
      ramsay09 last edited by

      the image is not working. There is nothing to click on.

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

        Ooops, maybe Lightshot decided to stop our behaviour of posting direct links to images 😆 Edited!

        1 Reply Last reply Reply Quote 0
        • R
          ramsay09 last edited by

          Ok, thanks. This solution I have already tried but it was not working like expected and Indicator-shift would work. I think I have to choose a step-solution and have to accept an increase of block ammount.

          1 Reply Last reply Reply Quote 0
          • R
            ramsay09 last edited by

            hello,

            I would like to create an pips-counter or pips-package-counter. I don't know how to get the current distance from the last open position in pips or price-fraction. There is "in loop" "open price level" but how to use it to count for example 30pips packages. "pips away..." is not helping because output remains active after market is above spacing value.

            For example: buy order is open -> market is 30 pips in profit -> variable is count up -> market is 60 pips in profit -> variable is count up again ....

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

              You can connect multiple "pips away..." blocks like this: http://prntscr.com/6t8ctk The first block is the longest distance. This makes "if... else if... else" logic. And yes, it looks ugly, so I'm gonna write a new task to my to do list to make it somehow easier 🙂

              1 Reply Last reply Reply Quote 0
              • R
                ramsay09 last edited by

                I don't think that will work because I need a value, a number to calculate lot size later and actually up to a few hundred pips (depending on market).
                Is there no way to create something that delivers a value, that is proportional to an opened trade's distance from current price.

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

                  I don't really know what you are trying to do. Maybe you just need the value of Ask-OpenPrice or OpenPrice-Bid?

                  1 Reply Last reply Reply Quote 0
                  • R
                    ramsay09 last edited by

                    I need the current distance as a value (pips or double value) of the newest open trade (for example the latest buy). Profit or loss in pips will do that but I need it always for one lot only. I need a kind of ruler.

                    "in loop" "profit ammount of trade" / "Volume size" (for each trade 1 newest trade) could work, I hope.

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

                      Real Lot Size * Profit / New Lot Size

                      so if you have a profit of 10 from a trade with 0.2 lots, this is the same as profit of 20 from 0.1 lots.

                      As a code (to not use Formula block), this will be:
                      OrderLots() * OrderProfit() / 0.1

                      or...
                      OrderLots() * (OrderProfit()+OrderCommission()+OrderSwap()) / 0.1

                      and 0.1 can be some Variable as well

                      1 Reply Last reply Reply Quote 0
                      • R
                        ramsay09 last edited by

                        I have tried this
                        Screenshot_2.jpg
                        but the profit values are too big
                        Screenshot_3.jpg

                        What is wrong here?

                        ......
                        Screenshot_2.jpg
                        Screenshot_3.jpg

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

                          Damn, you already have so many variables 😮
                          Profit as pips?

                          1 Reply Last reply Reply Quote 0
                          • R
                            ramsay09 last edited by

                            Why not, it is selectable but any other value will also do. It should be a ruler. What I am expecting here is that I get on every candle (every tick) the current profit/distance for one lot from the last open buy trade.

                            The idea behind is to convert this distance value into lot size and use it when a new signal is generated to make EA dynamic or auto adapting to market situation.

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

                              Are you sure about the formula you want to use? You are asking why values are so big. Maybe because it's just the way it is using this calculation. You have Pips/Lots, so let's make some examples here:

                              50 pips, 0.1 lots => 50/0.1 = 500
                              10 pips, 0.01 lots => 10/0.01 = 1000

                              For me, such a big values looks normal 🙂

                              1 Reply Last reply Reply Quote 0
                              • R
                                ramsay09 last edited by

                                my calculation was wrong but how to do it to get profit for one lot? This was also not working as expected:

                                (trade profit from 0.1 lot) / (trade lot size 0.1/0.01) = 100pips profit / (0.1/0.01) factor = 10pips profit for one lot of 0.01

                                I am dividing here the profit from 10 lot with the ammount of lot on the latest trade.

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

                                  You can see my idea, or what I believed that you want to do: viewtopic.php?p=8897#p8897

                                  When it comes to pips... I don't know really. To be honest, I am pretty bad at mathematics, so my mind automatically rejects to put pips and lot size in the same formula 🙂 Pips = some price distance, Lot size = money amount. There is a parameter that connects those two worlds (how much money for 1 pip at a given lot size), but it's value can be always different, depending on the currency, the current price and the deposit currency. So, my suggestion will be to work only with the money values - lot size, profit (in money), balance, equity and so on.

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    ramsay09 last edited by

                                    thanks, money is working correctly.

                                    1 Reply Last reply Reply Quote 0
                                    • R
                                      ramsay09 last edited by

                                      Unfortunately I have problems to understand the code of the Super Money Grid EA I have attached. Could you "tell" me how and where they calculate the take profit. What logic/method do they use. I would like to add this to my EA.

                                      ......
                                      Super Money Grid.mq4

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

                                        http://prntscr.com/6u1x91
                                        http://img.prntscr.com/img?url=http://i.imgur.com/6L0UTrE.png

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

                                          You can try to add this function CalculatePipValue here https://fxdreema.com/studio/MQL4 and then use it in Value -> Numeric like this: CalculatePipValue(0.1)

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            ramsay09 last edited by

                                            thanks so far. I will try the obove mentioned later.

                                            Now, It is necessary to use manually opened trades with group trades. It is possible to use groups in one block (111,110,500,...) but I need to add manually opened trades to blocks (111,110,500, manually opened, ...). To use "All" is not possible because there will be groups (600,800,...) that should be not take into consideration. Do manually opened trades have a group number too?

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 22
                                            • 23
                                            • 10 / 23
                                            • First post
                                              Last post

                                            Online Users

                                            R
                                            F
                                            S

                                            13
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors