fxDreema

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

    Draw line at highest candle body close

    Questions & Answers
    2
    13
    861
    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
      SirLuk last edited by

      Hi guys, can anyone help with this? So what I want is the following: If the body of candle ID 1 closes higher than the bodies of IDs 2-80, I want a line drawn at the high of the body. This horizontal line (A no, B yes) will of course adjust, if following candle bodies have higher highs. I tried doing it with market properties - highest price (candle period), but it's not what I want, since it's the body of the candle that I'm looking for and not the wicks.

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

        @sirluk Try this, use the variables to draw the line.

        https://fxdreema.com/shared/nTapHIZL

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

          Thanks @jstap, I actually used the same loop you suggested in my previous question and that worked fine. Appreciate your help.

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

            @sirluk Your welcome

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

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

              but @jstap, why is this not working? https://fxdreema.com/shared/WttYNtlZc

              It works when a bull candle makes a new high, but when a bear candle follows, the line adjusts to the close of said bear candle. It shouldn't according to my plan. If it's not a new high (looking back 80 bars), the line should not adjust...

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

                @jstap this shouldn't happen. The pink line should stay at the close of the highest green candle!

                0_1649679088795_Unbenannt.PNG

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

                  @sirluk I don't know, I also don't know what settings you are using.

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

                  S 2 Replies Last reply Reply Quote 0
                  • S
                    SirLuk @jstap last edited by

                    @jstap are you able to see my variables? Both variables used start out with the value 2. So if we just look at the right hand side of the tree in https://fxdreema.com/shared/WttYNtlZc the first condition should activate if the candle ID 1 close is higher than ID 2 close...then the formula keeps adding 1 to the variable and runs the condition again. Once the variable hits 80...a line should be drawn at the candle close.

                    In short...a line should be drawn at the highest closing price of the last 80 candles. I really can't see where I made a mistake...

                    @l-andorrà any ideas from you?

                    Appreciate your help, guys.

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

                      @jstap @l-andorrà oh and the mistake I'm getting you can see in the pic...the line was originally at the close of candle ID 2 (green with long wick) and then moved down to the close of ID 1 once that candle closed. That's what I don't get...my first condition says candle ID 1 close > ID 2 close. Don't know why the line should move.

                      0_1649705113862_Unbenannt.PNG

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

                        @sirluk It doesen't matter what the loops are doing, it will always draw the line on candle 1 5m close.

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

                        S 3 Replies Last reply Reply Quote 0
                        • S
                          SirLuk @jstap last edited by

                          @jstap why? Especially since I have a condition that says candle ID 1 close has to be higher than ID 2 close?

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

                            @jstap and it doesn't as you can see in this pic here...the line at close of ID 2 is wrong, it should be at close of ID 3 and stay there. But it also didn't move to ID 1 close. I don't understand... 🙂

                            0_1649707065949_Unbenannt.PNG

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

                              @jstap I think I found the problem...I realized I have to build in a modify variables block before the draw line block to reset the variable to 2. Otherwise it just goes higher and higher.

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

                              Online Users

                              L
                              K
                              H
                              N

                              16
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors