fxDreema

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

    Check second condition within 'n' bars after the first condition

    Questions & Answers
    3
    6
    1045
    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.
    • U
      unimatrix last edited by

      Hello everyone,
      i have two conditions:

      • first one is a moving average crossover
      • second one is a candle close below/above a moving average

      I got those two conditions working but i want to check the second condition within 'n' bars after the first one ( the crossover). If thats true then enter buy/sell. How do i set this up ?

      I tried "Loop pass n times" the second condition after the first one is true, but this doesn't seem to work

      0_1591029775821_Screenshot_1.png image url)

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

        Counting candles will be easier. Just create a variable adding +1 every new candle open after the first condition is true. Then use a condition block so that if 'current counter' = 'n bars after condition' the trade is open.

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

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

          @l-andorrà
          Thank you for your help. Here is my current project:
          https://fxdreema.com/shared/xnrI3zX3c

          How exactly do i count "every new candle open" after the first condition?

          1 Reply Last reply Reply Quote 0
          • V
            varso last edited by

            First
            it looks like easy and nice system.
            Second
            I did always this thing. I made variables like PosBuy and put value 0 after crossing variable change to 1.
            Its not fancy but for me work like always.

            https://fxdreema.com/shared/JFtNYG5hb

            0_1591044583934_2020-06-01 22_36_28-xxx - Opera.png

            U 2 Replies Last reply Reply Quote 0
            • U
              unimatrix @varso last edited by unimatrix

              Here is my updated project. It works now, but i don't know if i'm overcomplicating things... 😉

              https://fxdreema.com/shared/OwtaF9lvc

              1 Reply Last reply Reply Quote 0
              • U
                unimatrix @varso last edited by

                @varso Thank you, looks like a good solution!

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

                Online Users

                S
                A
                B
                A
                J
                D

                17
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors