fxDreema

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

    Price has moved to far.

    Questions & Answers
    3
    7
    644
    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.
    • E
      ejsellers last edited by

      Hello,

      I searched the forum before asking and I apologize if this has been asked before but.

      I want the ea not to take a trade if previous candle or price has moved over 1x ATR and to wait for a new signal to form.

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

        1. Does 'previous candle' mean its body or from high to low.
        2. What do you mean by 'price'? Price compared to what exactly?

        (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
        • T
          trader.philipps @ejsellers last edited by

          @ejsellers You can compare candle size of last candle with atr

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

          1 Reply Last reply Reply Quote 0
          • E
            ejsellers last edited by

            @l-andorrà whole candle high and low
            I refer to the value of the pair at the start of the candle. If eurusd price is 1.09409 and the ATR is 50 pips . If price rises or falls by 50 pips I want EA to wait til next signal.

            1 Reply Last reply Reply Quote 0
            • E
              ejsellers last edited by

              @trader-philipps can you tell me how?

              Thank you

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

                @ejsellers It's quiet simple. I like to calculate distances in pips. As ATR is a price fragment, I need to transform it to pips and compare afterwards to candle size.
                So first I need to get the pips. As there are different digits per symbol possible, I first calculate the multiplicator and store it in a variable (I later use). This I do on the on Init tab, because it's not necessary to do re-calculation more than at start unless your EA trades more than the symbol you attached the EA on.

                1. Create a double variable that you store the multiplicator in (I used vd_toPipsMulti).
                2. On the On Init tab create a custom MQL code block with the following code

                //calculate PIPs multiplicator
                vd_toPipsMulti = MathPow(10,_Digits-1);

                // Print to log
                Print("PIPs Multiplicator: " + vd_toPipsMulti);
                0_1569749430329_9d1e2f73-dc83-4e76-9c6f-bc4c4dc8b895-grafik.png

                1. Now you have different options. I show 2, but you'd just need 1

                3.1. Simple one, just the condition block
                0_1569749538123_ca7632cb-47ed-4e85-87f4-fae10173ad65-grafik.png

                3.2 If you want to keep the values maybe for different calculations, you may store them to variables and than do the condition block
                0_1569749674094_afcde67b-e4cf-42e9-ab2f-6f0572db5dab-grafik.png

                If you use ATR for more purposes than candle-size comparison you may prefer alternative 2 maybe.

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

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

                  @trader-philipps WOW this is really advanced.

                  Thank you

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

                  Online Users

                  S
                  M
                  A
                  A
                  L
                  G
                  N
                  S

                  22
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors