fxDreema

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

    candle ID in lower TF

    Questions & Answers
    3
    10
    459
    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.
    • aliso
      aliso last edited by

      hi
      how can i convert candle id in higher timeframe to lower timeframe?
      for example
      in 1H my candle id is 10 so i have ID10
      ID10 also has a time
      i want to know what is the ID number in 1min chart
      it can be ID600 in 1min
      but how can i achieve this?
      i have one solution but its not efficient
      i get the time of 1H Candle
      then in 1min chart i loop through every candle and check if time of each candle are equal to Time of 1H Candle
      if times are the same so my candle Id in 1min would be my counter(in the loop)
      but its not sufficient and takes 1 to to second to calculate this and my EA would be Laggy in the chart
      any idea how can i achieve this?

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

        You select time in the block but, 1h opens in the hour, 15m opens every 15min, so not sure how much use this would be.

        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! 😊

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

          @jstap
          time value is the same
          so if you have Time of candleID10 in 1H you can go to 1min chart and look for the the same Time and see what is the CandleID in 1min
          but dont know how to do this in FXDreema without loop

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

            You don't need the ID if you have the time.

            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! 😊

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

              @jstap how can i convert candleID in 1H to candleID in 1min?

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

                Don't know but time is always the same.

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

                  Record the datetime value of hourly candle:

                  datetime timevar = iTime(NULL, PERIOD_H1, 123);
                  

                  Get the candle ID from that time, in selected timeframe:

                  int idvar = iBarShift(NULL, PERIOD_M1, timevar);
                  

                  https://www.mql5.com/en/docs/series/itime
                  https://www.mql5.com/en/docs/series/ibarshift

                  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

                  aliso 1 Reply Last reply Reply Quote 1
                  • aliso
                    aliso @roar last edited by

                    @roar thx for response
                    how you do this in fxdreema?

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

                      Like this, for example

                      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

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

                        @roar thx let me try it

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

                        Online Users

                        M
                        M
                        C
                        N

                        19
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors