fxDreema

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

    Breakout

    Questions & Answers
    2
    15
    3367
    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.
    • C
      coverman last edited by

      I've seen some discussion in this forum about breakout settings, but I'm not sure how to make the following.

      I want to make a pending order to buy when market is 5 pips above the highest high of the last 5 candles.
      Should I use the modify block for this? Every other topics I've seen about this is talking about the condition block, but in that one I don't understand how to set the correct values.

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

        Condition block can give you the highest price out of N candles or within a period of time. 5 pips above... just write "+0.0005" or "+5pips" in Adjust.

        1 Reply Last reply Reply Quote 0
        • C
          coverman last edited by

          But the condition block is an if statement, right?

          If I want to find out what the highest high of the last 5 candles is. Shouldn't I use another block to set this number?
          Like a modification block? And then refer to that somehow, when I set the Buy pending order block?

          Or, how should I use the condition block for this?

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

            "Condition" block checks two values. Additionally, all the options used in this block are also available in other blocks. Whatever you select, there is some value behind it. Select Candle -> Close and it will give you the value of Candle Close.

            If you want to compare two values, do that in "Condition". Use "Adjust" if needed. There is no need to put some values in variables if you can do this directly,
            If you want to use a value directly in block like "Buy pending order", as it's open price for example, then do it like this: http://prntscr.com/6926s6 Again, there is no need for variables in this situation.

            1 Reply Last reply Reply Quote 0
            • C
              coverman last edited by

              Ok, so I could probably set most of it in the Buy pending order block?
              Wouldn't the attached settings buy an order when it reaches 5 pips above the highest high for the last 5 hours?
              And then set a stop loss at 30 pips below and TP 60 pips above?
              Or do I have to add a block prior to this one to get this result?
              It looks like everything is available here?

              ......
              breakout.png

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

                Yes and No.

                • First, you are working under "on Tick", which means that blocks are executed once per tick, at least those on the top.
                • Then, when a given block does it's job, it makes other blocks to run - thiose connected to it's orange output. Or the yellow one.
                • Most blocks are just scripts, one-time instructions - when you run them once, they do what they have to do and that's all, they quit and then will not run by themselves.
                • "Condition" block checks the environment - it compares 2 values and directs you to one of it's outputs.
                • "Buy now" and similar blocks does not wait for anything, they does not wait for the time to be 05:00 and then to run, they just execute their code in the moment and that's all. This happens in milliseconds! "Buy now" creates it's trade and quits. Again, this happens in milliseconds, right after this block is run by another block. If you run it again, it will create a new trade.
                • Absolutely the same goes for "Buy pending order"
                • "Open at price" in "Buy pending order": If you say that this is Candle High at 05:00, then the open price will be High of the candle that stands at the last known 05:00 for the chosen timeframe. If the current time is 02:43, it will give you candle high of 05:00 of the previous day.
                • But you can always put some time filter above, just to be sure that you create your pending order after 05:00.
                1 Reply Last reply Reply Quote 0
                • C
                  coverman last edited by

                  Hehe. Yes, of course I need a block on top checking if there is no trade running.
                  And then a time frame block would be good. But is my settings doing the correct thing?
                  Will it look for the last 5 hours highest high? And then place a pending buy order at 5 pips above that?
                  Or is it better to do something in a condition block? I'm just not sure what to compare there. Since I'm only looking for the highest high during the last 5 hours.

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

                    It looks good if you run this block after 05:00. But you can simply test it 🙂

                    1 Reply Last reply Reply Quote 0
                    • C
                      coverman last edited by

                      Hmmm, I was looking at your answer and the block again.
                      You said I need to run it after 05:00 to make it work correct.
                      But what I'm looking for is to check the last 5 hours.

                      So, if I start this at 10:00 it should look for the highest high 5 hours back until now.
                      Are my settings wrong then? Are my block talking about 05:00 as a time setting and not a period of hours?

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

                        Then what about this option:
                        http://i.imgur.com/crR8Pbn.png

                        1 Reply Last reply Reply Quote 0
                        • C
                          coverman last edited by

                          Yes. That is exactly what I am looking for, but I don't understand what to put on the other side of the condition.
                          What should I compare this with? Bigger (>) than what? That's what I can't figure out by using the condition block here.

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

                            Compare it to whatever you like. This results in a value that is the highest point of the last 5 candles. It can be compared with another price value in Condition or it can be used as a value in other block.

                            1 Reply Last reply Reply Quote 0
                            • C
                              coverman last edited by

                              I might be a bit stupid here, but I don't understand what to compare it with?
                              If I want to place a pending order that is 5 pips above the last 5 highest high. Then I don't understand how to use the condition block to get the result.

                              This is supposed to be like a breakout system.
                              Check the last 5 hours highest high and place a limit order 5 pips above that.
                              Then I want to make the same thing with the lowest low.

                              I'm a little confused about the condition block to get this to work.
                              I can't figure out if I actually need to compare something to get this? Or what should I compare?

                              😏

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

                                I'm always explaining things in general and often I am giving more information than the requested.

                                I already said this maybe few times, but I will say it again.
                                This, only the left side of Condition block...
                                http://i.imgur.com/crR8Pbn.png
                                ... is giving you a value. Simple beautiful price value. A value that represents the highest point of the last 5 bars. Again, this is a value, it's not an apple, it's not a pear. Numeric value.

                                In "Condition" block you can compare 2 values. But you should use "Condition" block only when you want to do that. Use "Condition" block when you want to compare 2 values.

                                You don't want to compare two values, you only want to use a value that is otherwise accessible in "Condition". No problem, everything that you can load in "Condition", you can load it in other blocks as well. "Buy now", "Buy pending order"... like this:

                                http://i.imgur.com/qFdrrAT.png

                                1 Reply Last reply Reply Quote 0
                                • C
                                  coverman last edited by

                                  Great!!! Thanks a lot. A great way to explain.
                                  Then my idea earlier was almost correct. I just got confused when you were talking about the condition block.
                                  So, now I will try this and see what happens. Fantastic. Thanks a lot.

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

                                  Online Users

                                  S
                                  O
                                  K
                                  M
                                  M
                                  C

                                  13
                                  Online

                                  146.7k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors