fxDreema

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

    🤔 Stop Loss - Middle of Last Candle?

    Questions & Answers
    3
    15
    1024
    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.
    • D
      davidmcc last edited by

      How do i set a stop loss to be placed at the middle point of the last candle's total size? I dont think the "median price" is the right option in candle settings.

      Abade69 1 Reply Last reply Reply Quote 0
      • Abade69
        Abade69 @davidmcc last edited by Abade69

        @davidmcc You could:

        1. Substract the distance between the candle's high minus the low
        2. Divide this distance by 2.
        3. Sum that quantity to the low of the candle you are interested in.

        This should point out the exact middle. Then in "Stop-Loss" you use "Custom-pip" and insert the variable you are using.

        Keep in mind that the stop loss placement may fail if your entry price is invalid.

        1 Reply Last reply Reply Quote 0
        • D
          davidmcc last edited by

          @Abade69 Sounds like i need some cutom variables.

          Any idea of blocks / values I can use to get started?

          Abade69 S 2 Replies Last reply Reply Quote 1
          • Abade69
            Abade69 @davidmcc last edited by Abade69

            @davidmcc Wait, I'll prepare an example... Are you using MT4 or MT5?

            D 1 Reply Last reply Reply Quote 0
            • D
              davidmcc @Abade69 last edited by

              @Abade69 MT5. Thank you

              Abade69 1 Reply Last reply Reply Quote 1
              • Abade69
                Abade69 @davidmcc last edited by

                @davidmcc Here it is: https://fxdreema.com/shared/mnDuTcAvd

                It will paint a pink line where the mid point of the last candle is. Included execution examples for buys and sells and how to trail it using the mid point, hope it is a good starting point for your EA.

                D 1 Reply Last reply Reply Quote 0
                • S
                  sktsec @davidmcc last edited by

                  @davidmcc
                  Use formula block to get 0.5*(Candle High + Candle Low). That's what you need

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    davidmcc @Abade69 last edited by

                    @Abade69 dude thank you so much! I'll let you know how it goes.

                    Abade69 1 Reply Last reply Reply Quote 1
                    • Abade69
                      Abade69 @davidmcc last edited by

                      @davidmcc This option brings the same results and it's much cleaner:

                      2.png

                      MT5 distorts the levels and candles, that's why it may seem a bit off in some places. Hope it works!

                      D 1 Reply Last reply Reply Quote 1
                      • D
                        davidmcc @sktsec last edited by

                        @sktsec thank you sir!

                        1 Reply Last reply Reply Quote 0
                        • D
                          davidmcc @Abade69 last edited by

                          @Abade69 It's funny because I tried that but I guess I didn't set it up properly before. It does work actually. Thanks for mentioning it again.

                          Abade69 1 Reply Last reply Reply Quote 1
                          • Abade69
                            Abade69 @davidmcc last edited by

                            @davidmcc Always check the "Candle ID" box, that's where the EA is taking the information from.

                            Candle ID = 1 means you are reading the last candle information.
                            Candle ID = 2 means you are reading the information of the candle before 1
                            and so on..
                            Candle ID = 0 means you are reading information of the current candle, so the total size will always be zero if you try to read it too early (that's the default value if you leave it empty).

                            D 1 Reply Last reply Reply Quote 1
                            • S
                              sktsec last edited by

                              Also check your buy/sell price is above/below the previous candle median price.

                              D 1 Reply Last reply Reply Quote 0
                              • D
                                davidmcc @sktsec last edited by

                                @sktsec very good point and definitely something to consider. Thank you!

                                1 Reply Last reply Reply Quote 0
                                • D
                                  davidmcc @Abade69 last edited by

                                  @Abade69 I appreciate that info. Thank you sir

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

                                  Online Users

                                  B
                                  M
                                  K
                                  S
                                  F
                                  B
                                  T
                                  E

                                  24
                                  Online

                                  146.6k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors