fxDreema

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

    Is second crossover possible?

    General Discussions
    crossover second crossove
    4
    13
    2788
    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.
    • M
      Mohamed80 last edited by Mohamed80

      Hello,

      I want the EA to trade the second crossover of an indicator.

      For example: MA 5 crosses over MA 10 for the second time.

      MA 5 bullishly crossed over MA10 then bearishly crossed then crossed up again. When this happens, the EA should trade and go long.

      So what I need is to look back and find the last crossover as a bearish one and before it a bullish crossover.

      Can this be done?

      Thanks,

      l'andorrà S 2 Replies Last reply Reply Quote 0
      • l'andorrà
        l'andorrà @Mohamed80 last edited by

        @mohamed80 Yes, you can do that wth variables. You can create a boolen variable to identify the first crossing and then requiring it as a condition for the next one, for exmple.

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

        M 1 Reply Last reply Reply Quote 0
        • S
          seb 0 @Mohamed80 last edited by seb 0

          @mohamed80
          The cross up of an indicator is always preceded by a cross down, that is also always preceeded by a cross up, that is also always preceeded by a cross down... and this is right going forward as backward.
          So the question you should ask rather is : How can I set a signal whenever a cross up is preceded by another cross up within a certain amount of time ?
          The answer is : how many time ?

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

            @l-andorrà Thanks for your reply. Can you please share a small example of how to identify the first crossing? I am relatively new to FXDreema.
            Thanks

            1 Reply Last reply Reply Quote 0
            • M
              Mohamed80 @seb 0 last edited by Mohamed80

              @seb-0
              Thanks for your reply,
              Normally I set my EA between certain price levels or with other filters. I activate and deactivate the EA at certain levels/time so not each second cross will be taken all day long.

              However, you have a good point.

              Once I know first how to identify the first crossing as l-andorra suggested, then I can try further additions for learning purposes.

              S 1 Reply Last reply Reply Quote 0
              • S
                seb 0 @Mohamed80 last edited by

                @mohamed80
                Sure you can do it with with boolean variables as with double variables, this way :
                https://fxdreema.com/shared/37zJjRjbb

                M 1 Reply Last reply Reply Quote 0
                • M
                  Mohamed80 @seb 0 last edited by Mohamed80

                  @seb-0

                  Thanks for the example.
                  Should I place the (Once per Bar) below the condition?
                  The reason is that I want to make sure the first crossing did happen after the candle has closed and not during the forming of the bar.
                  I found this link https://fxdreema.com/demo/mt4-once-per-bar

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    seb 0 @Mohamed80 last edited by

                    @mohamed80
                    The order doesn't really matter here cause the candle 1 means the previous candle(closed).

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      Mohamed80 @seb 0 last edited by

                      @seb-0
                      Thanks,
                      Do you have an example for the boolean variable?

                      1 Reply Last reply Reply Quote 0
                      • M
                        Mohamed80 last edited by

                        @seb-0

                        Wanted to ask about some variables in your example. I saw P1/P2/P3 and v1 + 1.

                        Are those variables for mathematical calculations? Where would I find relevant documentation for detailed explanation?

                        Thanks,

                        1 Reply Last reply Reply Quote 0
                        • max c
                          max c last edited by

                          can use set flags true false and check flag. under flags

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            Mohamed80 @max c last edited by

                            @max-c
                            Thanks for your input.
                            How can the True/False flag look back to find the most recent crossover?

                            1 Reply Last reply Reply Quote 0
                            • max c
                              max c last edited by max c

                              https://fxdreema.com/shared/HX9t1g22b

                              last one after buy resets back to false.

                              next condition can happen anytime as long as check flag is true, need to find a way to measure time from cross . like wait x number of bars then set as false again after the first set flag leg.

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

                              Online Users

                              A
                              A
                              E

                              16
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors