fxDreema

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

    How to get price range from highest price and lowest price in specific time range

    Questions & Answers
    5
    11
    3163
    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.
    • A
      Aizen last edited by Aizen

      I want to get price range as number in pips, so I could use it in formula. I try to use formula block to get price range, but no value appears shared/IZ3hwTn0e

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        in tester is value from log file
        0_1519334435242_a396bfa7-28f6-4b59-bad0-dbcd208e88ac-image.png

        ... you probably need value in pips ... you can use some custom code to convert it to pips, like
        Price_range=toPips(Price_range);

        Between trading and gambling is a very small gap, be careful.

        1 Reply Last reply Reply Quote 0
        • A
          Aizen last edited by

          Strange, I used log message to learn what value I get, but nothing appeared in journal. I will check my mt4 platform or restart it.

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

            I still don't recommend to anyone to use my functions, such as toPips(). One day I may rewrite the function or simply delete it. I'm very bad at planning, so very often when I look at my old work, I don't like it. So I change my code from time to time. toPips() in particular was never changed, but who knows.
            What I don't like in this function is that it actually has second parameter, which is the symbol. In other native MQL function the symbol is the first parameter.

            1 Reply Last reply Reply Quote 0
            • A
              Aizen last edited by

              I restarted my MT4 platform, and journal started show log entries. I used crude method to convert to pips by entering *10000 text to adjust line. I know that this method is not universal it can change with currency pair or broker. For test purpose its enough.

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

                You mean those long long numbers? They should be treated with NormalizeDouble(), but I found out that even this doesn't help all the time.

                1 Reply Last reply Reply Quote 0
                • A
                  Aizen last edited by

                  Yes long numbers, multiplying worked for me. Can long numbers slow down optimization?

                  1 Reply Last reply Reply Quote 0
                  • M
                    miro1360 last edited by

                    I think they dont slow optimization

                    Between trading and gambling is a very small gap, be careful.

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

                      Those long numbers are because of the way they are stored in the memory, this comes from the C programming language. I don't understand it very well, but they simply exists like that. There is a function NormalizeDouble() that should turn them into normal numbers, but even that sometimes doesn't work... I don't know why. I put that function all around the blocks, but still long numbers appear out of the blue.

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

                        @fxDreema where can I read all of FxDreema Functions? I wanna learn and read it from time to time to keep updated and improve my eas

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

                          NormalizeDouble() is a standard metatrader function, all can be used in FX, google or any AI platform will show you these, this will link you to a conversation talking about using the side of FX that is not so obvious...

                          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

                          C
                          M
                          P
                          R
                          S
                          E
                          M
                          P

                          24
                          Online

                          146.7k
                          Users

                          22.4k
                          Topics

                          122.6k
                          Posts

                          Powered by NodeBB Forums | Contributors