fxDreema

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

    Stops/adding variables?

    Questions & Answers
    3
    23
    3739
    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
      Chemdog last edited by Chemdog

      I'm having a hard time doing a custom stop placement. So the strategy is first candle to make a new high over a bearish candle. And my goal is to place a stop at the low between the bearish candle and the breakout candle. pretty much the pivot between the two. I see I can do Modify stops of trades, Market properties, Lowest price (candle period) then choose a specific distance which is nice but i would like the end candle id to be the most previous bearish candle. Thanks for any thoughts.

      this is what I have so far.
      0_1569001438155_v.1.mq4
      0_1569001534554_Screenshot (10).png
      just some examples
      0_1568947310618_Screenshot (6).png

      1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by l'andorrà

        You are using candle ID 0 on the right operand of block 7. That will always be problematic, as you are comparing with the current candle before it is closed. I recommend you to use candle ID 2 for thw left operand and then candle ID 1 for the right operand.

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

          thanks for the tip 🙂 ill change it up. If anybody else has any suggestions i'm all ears. As you can tell im new.

          T 1 Reply Last reply Reply Quote 0
          • T
            trader.philipps @Chemdog last edited by

            @chemdog Just to check, if I got you right ...

            0_1569030715738_e9f2bef6-de6f-4e21-9736-d1e66abb4e98-image.png

            Candle 0 is the current, where the high of the last bear candle was broken.
            SL should be the lowest low since that time or the low of the bear candel?

            However, first you need to loop to find the last bear candle. at the moment you just check if candle ID 1 was a bear candle, right?
            If you know the last bear candle ID, you want to get the lowest low (of that candle) or the lowest low (of the candle since that time).

            Did I get that right?

            What about a situation like this (just for bear candle determination)?
            0_1569031649467_9e9f2e92-18f0-45f8-a8e1-80aeff2fbdbe-image.png
            Which one would be the bear candle that defines the breakout? the big one or the one after?
            Which would be the low to take? the lowest low since one of the bear candles or the last bear canlde (smaller one after big one?)

            Just want to make sure.

            In any way you may need to loop to find the last bear candle's ID or the relevant one. Then you know the breakout level and can calculate ypur SL and TP which at least in you screenshot appear to be the candle size of the bear candle. Right?

            I like to share my knowledge, but expect the others to contribute as well.

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

              For the first image that is correct. And the SL would be the low since that time. Between the breakout and the most recent bear candle. And atm yes i'm only checking candle id 1 is a bear candle (I think :D).

              As for the second image it would look like this 0_1569037707178_bear.png

              thank you for the tip. Ill look into looping it back to find the most relevant bear candle. appreciate it
              @trader-philipps

              T 1 Reply Last reply Reply Quote 0
              • T
                trader.philipps @Chemdog last edited by

                @chemdog I think, if you looped back and found your last recent bear candle, you might check if that one is a recent low - which would be the case if the lows to the left and to the right are higher.
                Maybe you would just look to the left in order to find the "relevant" bear candle.

                If you know the candle ID of the bear candle to trade, it's relatively easy to get all the infos you need such as candle size and candle low.

                In order to get the lowest low of a period there is a a way to easily get this.
                0_1569040422723_Auswahl_561.png

                The other calculations may look like this ...

                0_1569041006727_Auswahl_563.png

                your_bear_candle_ID would be the resulting ID of your loop and you'd store that in a variable as well, which you would place where I just wrote the text.

                I like to share my knowledge, but expect the others to contribute as well.

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

                  @trader-philipps So I managed to consistently enter at the high of the recent bear candle and place a stop at the low between the two. Still having problems looping back to the bear candle. I think it's due to me not knowing how to combine two variables in one slot.

                  this is what I have so far.
                  0_1569051134573_v.12.mq4
                  0_1569051069631_Screenshot (14).png

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    trader.philipps @Chemdog last edited by

                    @chemdog Haven't tested this, but should work like this.

                    0_1569067247751_Auswahl_564.png
                    I have defined an integer veriable "loop" for counting the cycle.
                    Modiy Variable block first resets the loop variable to 0
                    In the bear candle check condition I add +1 on every entry (white dot)
                    Iconnected yellow point to white point on condition block.
                    Once orange block (bear candle found) is hit, the loop exits and the last value of loop is the candle ID.

                    Does that make sense?

                    I like to share my knowledge, but expect the others to contribute as well.

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

                      @trader-philipps Yes you're starting loop variable at 0 and every time you loopback to check for a bear candle you add one till it finds it and you use that value as its ID.

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        trader.philipps @Chemdog last edited by trader.philipps

                        @chemdog You may want to exit the loop in case that no bear candle is found within a pre-defined maximum number of bars. In that case make a condition block connected to the yellow dot of (Bear candle ?" block instead of the the yellow - white connection.
                        0_1569107504652_5d5020da-c7c0-4747-80b7-24dc2b894ae2-image.png

                        I took 10 as an example. Hence if loop didn't find a bear candle until candle ID 10, it would exit.

                        I like to share my knowledge, but expect the others to contribute as well.

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

                          @trader-philipps So it seems that it's close to working but for some reason it wants to enter a trade right after a bear candle.
                          if you don't mind pointing out any mistakes that would be awesome.

                          https://fxdreema.com/shared/drMzxxvxc
                          0_1569114719725_v.18.mq4

                          T 1 Reply Last reply Reply Quote 0
                          • T
                            trader.philipps @Chemdog last edited by

                            @chemdog Ok, I give it a try. From first look ..

                            a) Block 8. What for you need that? It checks if last candle was a bear candle. If that's not the case it will exit the routine.
                            b) After block 14 (orange) you should get the candle's high and low and maybe size and store it into a variable. After that you check if current price is bigger than the candle's high

                            However, I feel there is still a flaw in the logic as you want to trigger that trade just once .. just assume that there are 3 bullish candle in a row that all pass the high of the last bear candle. In that case you don't want to open a trade each time, right?
                            But we will take a look for that later on.

                            A bit off-topic: 9 and 20 are EMAs, 50 and 200 are SMAs .. is that your intention?

                            I like to share my knowledge, but expect the others to contribute as well.

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

                              @trader-philipps Something like this?
                              https://fxdreema.com/shared/rQCuoIqVc

                              Right, I only want to take the first breakout over the previous bear candle then once the trade closes then I look for another opportunity. And yes that is my intentions with the MAs, To only take this setup when conditions are in my favor potentially.

                              thanks again for your time

                              T 1 Reply Last reply Reply Quote 0
                              • T
                                trader.philipps @Chemdog last edited by

                                @chemdog Here you go.
                                0_1569124420946_1569114719916-v.18.mq4

                                I updated the structure a bit.

                                In addition I made a little mistake when posting the loop stuff. Right would be this

                                0_1569124532799_d0bf9481-f979-444e-afec-9a74d660a348-image.png

                                For the adjustment you have to put the variable ID and add +1 .. here as loop is ID V1 you put V1+1

                                I run in tester. It does basically what you want. You may want to use stop orders instead of market orders. However, it was not very profitable. I think you need to add some minimal candle size of bear candle maybe. But check by yourself.

                                I like to share my knowledge, but expect the others to contribute as well.

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

                                  It is closer than when I started. I appreciate it, i'll keep working on it and i'll update you if any good news.

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

                                    So i'm running into this problem

                                    If you look at the first trade its reading the setup correctly (even though Conditions aren't met) But once it crosses the
                                    MAs then it thinks conditions are met and enters the trade. setup is working right if you compare to the last 2 trades

                                    0_1569458677424_Screenshot (21).png

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

                                      Ok I fixed. it Looped back to find bear candle ID and made sure the close was above 50 MA

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

                                        How would I go about giving each trade a group number and make sure they don't all close at once?

                                        T 1 Reply Last reply Reply Quote 0
                                        • T
                                          trader.philipps @Chemdog last edited by

                                          @chemdog working with groups you need a buy / sell block per group. Probably a variable would work as well.
                                          However, are the close conditions different if there are more than 1 trade on same direction?

                                          I like to share my knowledge, but expect the others to contribute as well.

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

                                            @trader-philipps After a few days and coming back I got the stop to recalculate the way I wanted, thank you.
                                            I have a few problems

                                            1. Trades are exiting all at once and this doesn't give some of the newer trades time to mature.
                                            2. Trades are taking the same trigger level multiply times
                                              0_1569783612115_Screenshot (25).png
                                            3. Sometimes trades trigger delayed and miss the initial breakout only to come back down and trigger a few
                                              candles later. Or miss the move completely missing an opportunity.

                                            I don't know if groups will help me individualize each trade but you could say each close condition is different if more than one trade is in the same direction.

                                            using the daily for testing

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

                                            Online Users

                                            R
                                            P

                                            11
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors