fxDreema

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

    Problem with opening trade when current candle crosses below MA

    Questions & Answers
    3
    10
    2194
    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
      CaesarCrypto last edited by

      Hi guys,

      I'm having a problem that doesn't seem to get resolved so I hope this new topic helps.
      Like my subject says I'm having problems with a trade opening upon a candle MA cross on the current candle.

      My aim is the following:

      I need my EA to open a trade when the current price is above/below an MA while another indicator also gives a signal. This works when both events happen on the same candle. But I also want my EA to open a trade when my indicator gave a signal on yesterday's candle but price only crossed above/below the MA today.

      To make it visible I have a picture below of how it should work. So the indicator cross happened on candle 1 but price was still above MA so no trade. On candle 0 price drops below MA and on the indicator the green line is still below the red line so a trade has to open. (When this would happen 2 candles later no trade should be opened so only if MA cross happen max 1 candle after indicator cross)

      0_1573251208479_8eabafd1-862b-4222-a35e-47f5008fa02b-image.png

      I tried a lot of thing combining ID1 and ID0 but nothing works. Below I have a share of what I already have tried for this:
      https://fxdreema.com/shared/q7TU2IDwb

      FYI: My EA is programmed so that it checks only every day at 23:40 PM and this is essential for my system.

      I hope someone can help me with this because to me it seems a pretty straight forward condition but I can't seem to get it to work.

      Thanks already!

      Cheers

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

        How do you troubleshoot this? A method:

        • break your structure into smaller pieces, as small as possible
        • test the logical passes piece by piece
        • use visual testing and some visual object to check: "comment"-block or "draw vertical line" are my favourites
        • if you get the visual confirmation from one piece of your project, modify the visual pointing to some other piece, and repeat
          -> at some point you must find what block / combination of blocks makes the error

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        1 Reply Last reply Reply Quote 1
        • C
          CaesarCrypto last edited by

          @roar Thanks for the tip!

          I went through my blocks and apparently it was my time filter that seemed to cause the problem. I have tried different things but the strange thing is that I only seem to get it to work when I use different kinds of time filter for different rows. For the normal cross the "once a day" works best (if I change that I see strange things happen) but when the cross happened on candle ID1 it only works when i use the "time filter" block.

          Isn't that strange? I just want all blocks to run once from the last 20 minutes of the candle so I would think I could use the same time block for everything?

          I'm just trying to understand the logic here.

          Thanks in advance

          https://fxdreema.com/shared/dm0Eg9NF

          roar 2 Replies Last reply Reply Quote 0
          • roar
            roar @CaesarCrypto last edited by

            @caesarcrypto I don't understand the structure here. Why there are 2 logic flows doing buy trades? Why not combine them to one? You are using same indicators in both flows?

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            1 Reply Last reply Reply Quote 0
            • roar
              roar @CaesarCrypto last edited by roar

              @caesarcrypto Ah, for the two slightly different entry conditions. Anyway, I would use a more conjoined structure, so there is more hierarchy (and less risk of some weird misunderstanding in logic flow)

              https://fxdreema.com/shared/rgZ96qppc

              I can't test this because I don't have those fancy custom indicators. Have you tried replacing your custom indicators with some standard ones, just to check the logic? Does the same problem appear?

              Need small help? Tag me in your post
              Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

                @roar Thanks again for the effort. I notice the ea runs much smoothers with your logic!

                I have done what you supposed and used the logic you sent me and adjusted the indicators to standard ones:

                • didi has been changed to the MACD and I have tweaked the settings so the MACD gives a signal on the same candle as the didi did.
                • I removed the WAE because it wasn't in play for this issue
                • I switched the average to the standard Linear Weighted MA also with settings so candles cross at the same place as my EA

                Unfortunately this hasn't solved the issue. This is the ea with the standard indi's: https://fxdreema.com/shared/ua3G60bzb

                As you can see below it still doesn't make the trade while the MACD makes a cross on candle ID1 and price crosses MA on ID0:
                0_1573393401376_9243a366-fa82-4301-a60b-07f8062d0f6d-image.png

                I haven't got time to change the indicators in this one: https://fxdreema.com/shared/8Kndpuzib
                In that one it did work like I sent in my previous post.

                roar 1 Reply Last reply Reply Quote 0
                • roar
                  roar @CaesarCrypto last edited by

                  @caesarcrypto
                  I changed the logic once more, apparently the ELSE-output from cross conditions don't work as expected, better avoid using that.

                  https://fxdreema.com/shared/jqvCgqYT
                  This build provides that secondary sell signal on eurusd 2013.08.29, although I think it is lagging 1 bar compared to your intended logic...
                  0_1573398136045_8be62d87-101d-46b9-a639-b34fb253e605-image.png

                  Need small help? Tag me in your post
                  Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                  C 1 Reply Last reply Reply Quote 0
                  • C
                    CaesarCrypto @roar last edited by

                    @roar Yes indeed and it also doesn't take the trade on 2017.02.10 when it should make a sell trade..

                    And could the time filter be the problem as it seems odd to me that by using 2 different time filters the ea does take the trade, as I have shown in my previous posts?

                    0_1573510360772_d01efa00-de74-466b-bb8a-21f21ccfb7cb-image.png

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

                      Hi everyone,

                      I've also sent an email to the admin about this problem since I can't get it solved and it is vital to my EA.
                      Is it normal that it takes several days before the admin answers, perhaps on vacation I don't know? I don't want to spam but it has been more than 5 days now since I sent an email.

                      Cheers

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

                        I can confirm he doesn't answer as quickly as we would like, but he always does.

                        (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
                        • 1 / 1
                        • First post
                          Last post

                        Online Users

                        R
                        F

                        14
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors