fxDreema

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

    EA not closing out trades on MA crossover

    Questions & Answers
    5
    14
    2901
    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 all,

      For my EA I'm trying to implement a rule where my trades are closed when the price crosses my moving average. As you can see below the trade is only closed the candle after the crossover:

      0_1572903230420_28b3b99a-1f02-4915-9678-518828943013-image.png

      These are my settings:

      0_1572903277801_daf4ea84-6453-4944-bb49-759880ec0bec-image.png

      The strange this is that sometimes it does work like here FE:

      0_1572903421073_97fd6035-4015-408e-9aea-a59764457f51-image.png

      Perhaps important to mention is that I have a condition where my EA only runs once per day with these settings:

      0_1572903484259_0d0bc300-6202-4dc4-af79-5ef7b32f9530-image.png

      I have also tried this option but then it doesn't close my trades at all.

      0_1572903563307_299175ba-a420-4926-8b3b-b324bd356610-image.png

      This is an overview of how my EA is strucutred, perhaps my problem is in the structure?

      0_1572903653152_418337da-ca06-428d-8b4d-d18bb8f3dfe5-image.png

      Thanks for all the help you gave me already!

      Cheers!

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

        @caesarcrypto Use a pass block and make the close seperate.

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

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

          @trader-philipps Sorry for my noob questions but what is a pass block or how does it look like?

          A 1 Reply Last reply Reply Quote 0
          • P
            Pipologist last edited by

            It is the first option under the "More..." Tab (listed on the left)

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

              @caesarcrypto Simply remove these links from close condition, it's an error because you already have two time filter condition above, it means that the closure of trade is affected by these filters

              0_1572975866692_s.JPG

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

                @ambrogio Yes but I only want to close out the trades when the condition is met during the timestamp set in the filter above.

                Because price can drop below and bounce back above the MA during the day but I dont want the trades to be closed then. Only when price is still below the MA just before the close of the candle.

                If I remove those links wont they be closed out immediately on the cross below the MA?

                Thanks already for all the help!

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

                  @caesarcrypto Change "once a day" block with "hours filter" block and let me know (without remove the links)

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

                    @ambrogio When I tried the hours filter it gave me the same results but then I realised I was using the backtester on visual mode at the settings "control point" instead of every tick because that takes way too long.

                    So I tried with visual mode off and with setting "every tick" and now it closes on the right candle.

                    I still find that odd because on the control points settings it jumps 20 minutes every time and my hours settings are 23:30 - 23:59. So I would think that when it jumps from 23:20 to 23:40 it should close the trade at 23:40 because at that time the price is below the MA... But it doesn't and I also noticed that on this mode it doesn't pick up on certain trades that it should be entering.

                    So the problem of the trades not losing is solved but now I wonder, is there no way to be able to analyse your trades on chart without the slow "every tick" option in visual mode?

                    Thanks!

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

                      A remark also said to split out the closing of the trades from the rest. So here below the left setup is better than the right one?

                      0_1572983199191_1f904ec5-3853-41ee-a451-c8088523fa6a-image.png

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

                        @caesarcrypto said in EA not closing out trades on MA crossover:

                        @ambrogio When I tried the hours filter it gave me the same results but then I realised I was using the backtester on visual mode at the settings "control point" instead of every tick because that takes way too long.

                        So I tried with visual mode off and with setting "every tick" and now it closes on the right candle.

                        I still find that odd because on the control points settings it jumps 20 minutes every time and my hours settings are 23:30 - 23:59. So I would think that when it jumps from 23:20 to 23:40 it should close the trade at 23:40 because at that time the price is below the MA... But it doesn't and I also noticed that on this mode it doesn't pick up on certain trades that it should be entering.

                        So the problem of the trades not losing is solved but now I wonder, is there no way to be able to analyse your trades on chart without the slow "every tick" option in visual mode?

                        Thanks!

                        No, there is not. Indeed, it is always very useful to make the visual backtest on each tick, and your case is demonstrated

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

                          Could you please share the last vesrion? Screenshots don't allow any potential bug within the blocks.

                          (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.

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

                            @l-andorrà hi, it's solved by using the tester on every tick feature 😉

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

                              @l-andorrà If you still want to check, this is the link: https://fxdreema.com/shared/UD2eAPmue
                              Perhaps you see other mistakes or inefficiencies that I made 🙂

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

                                @caesarcrypto

                                Interesting project. Nothing wrong as far as I can see. Tell us if you become a millionaire soon! 😉

                                (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

                                S
                                M
                                2
                                M
                                M
                                N
                                B
                                A
                                B
                                S
                                E
                                W

                                30
                                Online

                                146.6k
                                Users

                                22.4k
                                Topics

                                122.6k
                                Posts

                                Powered by NodeBB Forums | Contributors