fxDreema

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

    Break even for a group of trades

    Questions & Answers
    3
    34
    15322
    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
      cfabian last edited by

      Trail step is 30%, so again not sure what is the problem with stop vs step. Does this work as I assume (30% retrace from maximum water mark to close)?

      Is not that values are huge. It is a decimal thing with the broker. 1900 means 19 pips. Nothing else.

      __Again, your Step values are HUGE. I would not expect a Trailing block to behave as such when the Step option is bigger than the Stop option. What else can I say... I even posted an example. Well, not the same kind of values, but it works for EURUSD.
      Just do things one by one. Connect a block - test. Connect another block - test. Don't put 10s of blocks expecting that everything will magically work, it's so much harder to see what is really going on this way.[/quote:2pn11062]

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

        I think I explained everything, I don't know what else to say. Make one simple EA and try each block alone.

        I can see you use purple blocks for the Trade event. These should be used under "on Trade". I don't know what would be their behaviour under "on Tick"

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

          Will try to do more tests.
          My blocks I see them blue, not purple. They are part of the "trail stop/break even" section.

          You even used them for explanation in "on tick" as well with this link: https://fxdreema.com/shared/F5FBQ3avc

          So, which is correct?

          Can you please also try to explain with more clarity how to use % of trailing stop?

          This is what I understand from the settings in this block:

          • Trail start - Is the amount of pips in positive there is from a particular pair at which the trail starts to operate. For example 50. When profit is 50 pips this is activated.
          • Trail stop - After trail start is reached, trailing function is activated, and this Is the amount of pips behind trail start at which the first stop is placed. If have 37 and have 50 in start, then when I have 50 in profit, I lock in 13 pips as is the difference between 50 - 37.
          • Trail step - When profit continues growing, this is the amount of pips profit should grow before moving the SL again, and the SL moves by the same amount. For example, step 15, and continuing with the same example, when profit is 50 pips, then the stop for all trades moves to such level that I lock in 13 pips, and when profit reaches 65, then my SL moves again to a lock profit of 13 + 15. Then SL will move again at 13+15+15 when ptofit advances another 15 from 65.

          Not sure about this but:

          • The amount in trail stop is used as well as the loss we are willing to take for the whole basket of trades. Can be used as the initial SL for all trades.

          Is my all appreciation correct?

          Thanks again

          __I think I explained everything, I don't know what else to say. Make one simple EA and try each block alone.

          I can see you use purple blocks for the Trade event. These should be used under "on Trade". I don't know what would be their behaviour under "on Tick"[/quote:18ji9qv3]

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

            I'm talking about these blocks here - http://prntscr.com/b5292v These are designed to be used under "on Trade". If they actually work under "on Tick", this is only by chance, I never even tested them under "on Tick".

            What you are saying sounds right, at least for "Trailing stop (each trade)". For "Trailing stop (group of trades)"... I'm gonna check if this one works correctly, because I think that "Reset the stop on new trade" is not working.

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

              Ok, I believe I fixed the reset.

              So, how this block works. Virtual average price is calculated and it depends on the lot sizes. If you have 2 trades with the same lot size opened at levels 10 and 20 for example, then their average price is exactly in the middle - 15. But if one of the trades has bigger lot size, then the average price is closer to that bigger trade. SL is calculated from that price.

              When a new trade is opened (or some trade is closed), the average price in the group changes... obviously... because there is new member in the group. If "Reset the stop on new trade" is set, then when a new trade is opened the SL is put at TrailingStop distance from the current price. Now I'm not sure that this is the best behaviour, because it looks that if you open new trades too often the SL line moves away from the current price and it's hard to reach it. But how it should be anyway 🙂

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

                I decided that it's better to put SL at TrailingStop distance from the average price when a new trade is created

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

                  Thank you. So you fixed the reset on new trade then? What should I do? Simply download again the mq4 file and run again?

                  I've tested group trailing in many differnt ways and I cannot make it work. Maybe a bug there?

                  __Ok, I believe I fixed the reset.

                  So, how this block works. Virtual average price is calculated and it depends on the lot sizes. If you have 2 trades with the same lot size opened at levels 10 and 20 for example, then their average price is exactly in the middle - 15. But if one of the trades has bigger lot size, then the average price is closer to that bigger trade. SL is calculated from that price.

                  When a new trade is opened (or some trade is closed), the average price in the group changes... obviously... because there is new member in the group. If "Reset the stop on new trade" is set, then when a new trade is opened the SL is put at TrailingStop distance from the current price. Now I'm not sure that this is the best behaviour, because it looks that if you open new trades too often the SL line moves away from the current price and it's hard to reach it. But how it should be anyway :)[/quote:4dl0gfig]

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

                    Look, I am a simple stupid guy, my mind is weak. I was answering to question from different people for the last few hours and I'm not finished. I don't remember what happened in my own life yesterday, I can't remember people's problems with details. And I remember that I explained everything about Trailing stops and Break even and I also told you multiple times to put 2-3 blocks in an empty project and try how something works. I'm lost in this topic already. I don't know what "cannot make it work" means at this point. My native language is also not english, so I often misunderstood what people are saying to me. What I can suggest is again, make a very very, I mean very simple EA that has 2-3 blocks and shows the problem, whatever it is. You can make screenshots (Lightshot is amazing program) and show me what exactly is not working. When I see the problem I will fix it in minutes, but if I have to dig into people's projects searching for something that is decribed as "cannot make it work"... I just can't, I surrender.

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

                      Okay, I created a simple EA for basket trail that created several orders as price continues its way, and also one that only handles one SL condition. See the link below.

                      https://fxdreema.com/shared/ZewcqjOD

                      The EA is not doing the SL modification, however I saw this message in the log, that have no clue on how to deal with this kind of errors in case it was originnated by the trail function. By the way, the basket of trades does not exceed 10 trades, but at the beginning it should work with 3-4 trades as they start piling up. The start trail is 20 pips (2000 with my broker).

                      The error is this:
                      2016.05.18 14:23:58.303 trailtest3 (4) US30,M2: Modify error: Too many requests (141)

                      Any other clue on how to tackle this? The trail stop for basket trades is what is missing from my strategy.

                      By the way, the basket trail stop is used as the initial SL for the whole trades of the basket?

                      Thanks again for your help

                      __Look, I am a simple stupid guy, my mind is weak. I was answering to question from different people for the last few hours and I'm not finished. I don't remember what happened in my own life yesterday, I can't remember people's problems with details. And I remember that I explained everything about Trailing stops and Break even and I also told you multiple times to put 2-3 blocks in an empty project and try how something works. I'm lost in this topic already. I don't know what "cannot make it work" means at this point. My native language is also not english, so I often misunderstood what people are saying to me. What I can suggest is again, make a very very, I mean very simple EA that has 2-3 blocks and shows the problem, whatever it is. You can make screenshots (Lightshot is amazing program) and show me what exactly is not working. When I see the problem I will fix it in minutes, but if I have to dig into people's projects searching for something that is decribed as "cannot make it work"... I just can't, I surrender.[/quote:1wy307ha]

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

                        Well, I think this error is self explanatory. I guess you are testing this on live demo account. At least I don't have US30 in my Tester, but I have it as a symbol for live. If the EA can't do something, it woud try again and again, which is probably not the best thing to do in case of such error. But what to do? Learn the limits of your broker and don't break them, this is what sounds to be the right answer.

                        If there are too many modifications, Trailing STEP can be raised to make them rare.

                        For the "group" TS, it depends what the initial stops are. If there are no stops they will be created. If they are shorter than STOP... it depends on the option I added lately. But try it. Even I have to try something to remember how it's working. I don't work with this particular block very often. I also tend to be confused about the Trailing Stop stuff even when I'm working with it actively 🙂

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

                          Well, it looks really odd, as they aren't really too many trades to modify, something around 3-5, and SL value is not close to the gap required vs current price. Makes no sense, but understandable if were many many trades.

                          __Well, I think this error is self explanatory. I guess you are testing this on live demo account. At least I don't have US30 in my Tester, but I have it as a symbol for live. If the EA can't do something, it woud try again and again, which is probably not the best thing to do in case of such error. But what to do? Learn the limits of your broker and don't break them, this is what sounds to be the right answer.

                          If there are too many modifications, Trailing STEP can be raised to make them rare.

                          For the "group" TS, it depends what the initial stops are. If there are no stops they will be created. If they are shorter than STOP... it depends on the option I added lately. But try it. Even I have to try something to remember how it's working. I don't work with this particular block very often. I also tend to be confused about the Trailing Stop stuff even when I'm working with it actively :)[/quote:uzoi8at3]

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

                            This error appears after request, I believe. It's not like error that the EA is giving before even trying to communicate with the broker. You can count your requests to the server. I only think that this error has nothing to do with the EA itself

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

                              I think I have some advancements here after soooo many tests.

                              The "trail stop group of trades" option is starting to make changes ONLY if I select "all trades, automated and manually"

                              Now, I see that when having pending orders in the chart, it does different calculations. I believe it considers them, while to my point of view it should only calculate the values of real open trades.

                              Now, I also see that when new trades open, the SL does not modify, no matter I have the "reset stop option when new trade" turned ON. It does modify after price advances more.

                              I believe this block has some flaws. My appreciation is that many times it takes long to do calculations. For example, I have test settings in a demo account for "real time test", as follow: Start 10, stop 10, step 15. After overall profit is at 10, the SL gets modify to a value that is a net of -10 loss if hit. Not to a breakeven value as you suggested at the beginning of this thread. But what concerns me the most, is that in some ocasions, do not why, no matter profit is at around 20 (way after the start point of 10), I get no modifications whatsoever.

                              As per the SL moving after price continues and profit moving in increments equal to the step value, this is not moving. I have some open trades with profit over 60 pips, and the SL remains in a value that can incur of a net loss of -35. When it should have locked some 40 pips at least.

                              • EDIT - By now these trades are at +200 and SL remains at the same point, for a net loss of -35. It is not doing the step thing.

                              So, to me there is some bug in there, and calculations are not fast nor accurate.

                              I'll appreciate very much if you can dig in the code to see what is going on and fix it. This is the link of the trail EA test:

                              https://fxdreema.com/shared/F9yOFTWqc

                              Many thanks for your help and support

                              __This error appears after request, I believe. It's not like error that the EA is giving before even trying to communicate with the broker. You can count your requests to the server. I only think that this error has nothing to do with the EA itself[/quote:14lll8ln]

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

                                When you work with the Group parameter, you must be sure that in all trading blocks numbers are correct. By trading blocks I mean all blocks that can create, modify, delete trades and orders, or simply check something about them. You can try with "1,2" as a Group number in the TS block.

                                The problem with this "-10 pips loss" was because the update I made last time when I decided to use the avetage price instead of the current price. I reverted this now... I'm still not sure which is the right price to be used in this situation.

                                About the initial modify of SL... well, it looks that this happens once when the Start price is reached. There must be a reason why this parameter is called "Start" 🙂

                                I'm doing my tests in EURUSD and with 10-15-10 settings everything looks fine for me, SL is modified from time to time.

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

                                  I've revised all the blocks with group condition, and all are good with their respective 1 and 2.

                                  I understand about the start parameter, what I'm saying is that some times is not working, no matter is set to 10, I had a couple of times with profits of around 20, but no SL was made in place.

                                  Now, you suggest that for having a group of trades at BE when profit reaches start value, we should use that same start value in stop. But this is not happening as it places a SL at a real loss value. Will compile again my EA after your change and see if it works. Same thing for the trail SL.

                                  Thanks

                                  __When you work with the Group parameter, you must be sure that in all trading blocks numbers are correct. By trading blocks I mean all blocks that can create, modify, delete trades and orders, or simply check something about them. You can try with "1,2" as a Group number in the TS block.

                                  The problem with this "-10 pips loss" was because the update I made last time when I decided to use the avetage price instead of the current price. I reverted this now... I'm still not sure which is the right price to be used in this situation.

                                  About the initial modify of SL... well, it looks that this happens once when the Start price is reached. There must be a reason why this parameter is called "Start" 🙂

                                  I'm doing my tests in EURUSD and with 10-15-10 settings everything looks fine for me, SL is modified from time to time.[/quote:lvpaio6d]

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

                                  Online Users

                                  A
                                  T
                                  M
                                  E
                                  C
                                  B
                                  T
                                  P

                                  24
                                  Online

                                  146.7k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors