fxDreema

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

    Is there a way to configure the EA to wait for 3 consecutive losses and then enter orders?

    Questions & Answers
    6
    51
    11865
    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.
    • R
      rafaels919 last edited by

      Hi Tom, thanks for your response.
      That could certainly be a way around the issue, but I'd like to know if there is a way to actually observe the first three trades (open fictive trades as Philipps described) and wait for the condition (3 losses in a row).

      A 1 Reply Last reply Reply Quote 0
      • A
        ambrogio @rafaels919 last edited by ambrogio

        @rafaels919 what do you think of putting an object line on the chart (like the first order) and observing the price? if the price comes against us we lost once and so on...
        Condition TRUE == draw line 1 and so on..
        At the fourth line open your trade
        I misunderstood?

        1 Reply Last reply Reply Quote 1
        • R
          rafaels919 last edited by

          Hey @ambrogio .
          You mean placing objects as a fictive order? How would you configure that with blocks?

          if you could demonstrate what you mean, that would be great!

          A 1 Reply Last reply Reply Quote 0
          • A
            ambrogio @rafaels919 last edited by

            @rafaels919 what you think about a pending order? otherwise when the price touches the third line open buy now?

            0_1575053670693_Cattura.PNG

            1 Reply Last reply Reply Quote 0
            • R
              rafaels919 last edited by

              @ambrogio those lines are supposed to be triggered by indicators.
              The question is the same, can you configure the blocks to wait for 3 losses in a row, before opening a real order. You know a way to do that with "pending orders"?

              A T 2 Replies Last reply Reply Quote 0
              • A
                ambrogio @rafaels919 last edited by

                @rafaels919 suppose your loss is 50 pips per trade

                0_1575059006942_Cattura.PNG

                this is the case of pending order

                0_1575059043616_1Cattura.PNG

                this is the case if you want to draw a line

                0_1575059075320_2Cattura.PNG

                1 Reply Last reply Reply Quote 1
                • R
                  rafaels919 last edited by

                  @ambrogio Pending order didn't work unfortunately, or maybe I'm doing something wrong, that's possible too. In any case, thank you for helping out, I think I will just open the first 3 orders in very low volumes, just as @Tom-5 suggested.

                  Thanks everyone for their suggestions!

                  T 2 Replies Last reply Reply Quote 0
                  • T
                    trader.philipps @rafaels919 last edited by trader.philipps

                    @rafaels919 I'd like to come back to the fictive trades approach. However, I have some more questions or thoughts to sort out.

                    1. Do you want to loop back on EA start and see if the last 3 signals were losses? That would make things more complicated and may be a task to do once the fictive trade thing is more clear. The issue I see here is that I can look back only candle based and not tick based. That issue could lead to the point that a candle size could trigger both SL or TP, but I can't tell what came first as the candle just has 4 prices (open, low, high, close).

                    2. If look back is not necessary, would it be okay to store the loss counts in a variable? That would have the side-efect that if the EA get re-initialized eg. when input parameter changed or terminal was closed and re-opened, ounting would start at 0 lossses again.

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

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

                      @trader-philipps And one more thing: Does the loss count have to divide sell and buy trades or does either of them count as long as it is a loss?

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

                      1 Reply Last reply Reply Quote 0
                      • T
                        Tom 5 last edited by

                        I found maybe one more thing just right now because i also try to unstand this variables. But maybe it helps you.

                        0_1575092501768_780bd5ad-2b0a-462e-a0f2-274a1f1cfe3d-grafik.png

                        My idea would be. Let run one Demo account, and one REAL account with EA. Then send after 3 losses which the DEMO EA trades, and send the information to the real account EA. Its theory, but so everything starts 🙂 I know also that i had a trade copier some years ago to copy my trade for my clients. And there was an option, that they start to trade ONLY if the actual trade was already in minus. Means, if fxdreema can do it too, you can send also informations between 2 metatraders. Means one MT DEMO with EA,, and one MT REAL with EA. But i am only good in strategies atm. . To realize that idea you would need someone else 🙂 (possible is it, but dont know if fxdreema can do it too) If not, then buy a copytrader which can do it and your problem is solved. Hope it helps 🙂

                        "First learn! Then earn!" or "As more you learn, as more you earn."

                        C 1 Reply Last reply Reply Quote 0
                        • C
                          CPxiom @Tom 5 last edited by

                          @tom-5 Hello, yes, that's actually something I researched a bit, and you would need some dlls. Also.. to have a straight copier is easier than to have it to copy selectively.
                          But that would certainly take the pressure off from the search for some Holly grail indicator, EA.

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

                            @rafaels919 Wow, I had a glitch in the virtual trade part that drove me nuts. However, it's fixed now. Project virtual_trades_count

                            0_1575223717794_virtual_trades_count.mq4

                            And that's how it looks during virtual trade:

                            0_1575223475699_0d0203d5-c05e-4a41-847c-ab42bc9c965a-grafik.png

                            What I didn't manage is to draw the virtual trades in the chart. The problem is that I stored the time the trade was opened in a variable. But I couldn't manage so far to set that date as the start for the trendline I want to draw. Maybe someone with more experience in chart object may have a look at that.

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

                            C 1 Reply Last reply Reply Quote 1
                            • C
                              CPxiom @trader.philipps last edited by

                              @trader-philipps Outstanding excellent project! Felt inspired little bit :), so I tried to solve the draw trades part.
                              This is MA 5 x> 20 buy example.
                              The important thing is that the line has to be drawn after close condition, because that is when we have all data.
                              For the entry time, I used candle time, and counted candles so I could have the Candle ID. Closing time is ID1 after close condition.
                              Price variables (open and close) are modified when conditions happen.
                              https://fxdreema.com/shared/NQ06zsQnb
                              This is not adapted to the project, this is figuring it out project :). Fun.
                              0_1575245593626_Screen Shot 2019-12-02 at 02.12.23.png

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

                                @cpxiom Great approach. Was not sure how to store the candle ID on the open trade part as it moves with every candle. Will have a look later and will try to add it to the project.

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

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

                                  @rafaels919 Here is the updated version.

                                  For all others here....
                                  DON'T USE THIS ON REAL ACCOUNT!! THE ENTRY CONDITIONS ARE SET TO GET MANY LOOSING TRADES!!

                                  Changes:

                                  1. Implemented Spread Betting Sequence
                                  2. Tokenize Sequence in order to calculate max consecutive losses
                                  3. Implemented Virtual Trades as trendlines in chart (thanks to @CPxiom for inspiring me). The issue was that I used datetime datatype in the trendline open instead of a string datatype)

                                  Bugs fixed:

                                  1. Fixed a glitch when changing from live to virtual trades. Cannot use Max Consequtive losses in combination with virtual trades.
                                  2. Fixed an issue when virtual trade variables were cleared too early
                                  3. Removed some debug stuff

                                  0_1575349650831_virtual_trades_count.mq4

                                  Link to project

                                  And that's how it looks like now.

                                  0_1575349917721_8ad02f5f-bad2-4852-8a2a-f849092c4fb6-image.png

                                  Here is an extract of a tester run in order to check lot sizes in correct order.

                                  0_1575350290781_8ed720f0-35df-407f-8ca7-b1fb65b56592-image.png

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

                                  C 1 Reply Last reply Reply Quote 1
                                  • C
                                    CPxiom @trader.philipps last edited by

                                    @trader-philipps This looks really really great, and it's a very important project. It's more than what meets the eye here...You're the inspiration.

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

                                      @rafaels919 Here are the settings when using tester.

                                      0_1575376082991_b281c7dd-0c76-44d4-b951-efbe04a82c7d-image.png

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

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

                                        @rafaels919 Here is the latest version of the EA.

                                        Changes:

                                        • Added Phases (1-3) including control block
                                        • 3rd Phase looks for n virtual wins after Phase 2 (real trades) ended with max consec. losses
                                        • did some cleanup

                                        Project Link

                                        0_1575428806515_virtual_trades_count.mq4

                                        I did some basic testing and it looks as it performs as it should. However, there may be more testing required as it takes some time to get through all the phases.

                                        That's how it looks now:

                                        0_1575429020371_fbf65f53-ed00-4956-a7fa-f067c9f75114-image.png

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

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          rafaels919 last edited by

                                          That looks great! Thanks very much @trader-philipps and everyone who tried to help on this case!

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

                                            @rafaels919 As of last request, here is the latest version.

                                            Changelog:

                                            • Re- introduced max number of virtual trades configurable in EA settings for Phase 1

                                            0_1575483529032_virtual_trades_count.mq4

                                            project link

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

                                            C 1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post

                                            Online Users

                                            A
                                            D
                                            A
                                            E
                                            N
                                            N
                                            F
                                            M

                                            28
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors