fxDreema

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

    Stuck on a simple MA EA

    General Discussions
    2
    7
    1586
    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.
    • L
      llamatrader last edited by

      Hi, I have a simple idea using a moving average and price. basically on a short time frame, if price moves X distance above moving average sell, and vice versa. I cannot seem to figure out how to do this.
      Thanks -Jeff

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

        Use the "Adjust" field in the Condition block. Put something like "+0.0005" or even "+5pips" in there. A little bit more information about this you can find in the description of the Condition block.

        1 Reply Last reply Reply Quote 0
        • L
          llamatrader last edited by

          __Use the "Adjust" field in the Condition block. Put something like "+0.0005" or even "+5pips" in there. A little bit more information about this you can find in the description of the Condition block.[/quote:12dd3505]

          Thank you, always a big help

          1 Reply Last reply Reply Quote 0
          • L
            llamatrader last edited by

            One more question. How do I set it up for optimizing? other wise ill need to go back and constantly change it.

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

              Use Constants, as they are actually input parameters for the EA: https://fxdreema.com/demo/mt4-constants
              There is a problem if you want to use a constant in "Adjust" to make something like +5pips. Something like +MyConstantpips will not work for obvious reasons 🙂

              1 Reply Last reply Reply Quote 0
              • L
                llamatrader last edited by

                I added a constant where i would normally put like "+5pips" but now when I try to test or even run in mt4 nothing happens... 😆

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

                  +15pips is not a valid for "double" type variable (constant or whatever) at all. "double" variables - the values can be ONLY numeric values with floating point, such as 1.2345 or 2882.38387.

                  The value can be something like 0.0015 and then in "Adjust" you can put +ConstantName
                  The problem is that 0.0015 is a fixed number. Someone would recommend to write +toPips(ConstantName) and it will work, but this function is a custom function made by me, and at some point I may decide to change it or remove it

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

                  Online Users

                  H
                  F
                  H
                  M
                  H

                  10
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors