fxDreema

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

    moving average crossover method.

    Questions & Answers
    2
    8
    1492
    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
      mrfilthy11 last edited by

      what would i put in my trading moving average blocks to that the trade, buy or sell, only happens if it crosses over the other moving average like a lot. Im trying to eliminate false signals.. sometimes it barely crosses over and comes back.. I don't want that trade to go through... How do i do that in a moving average block ? Please help..

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

        The question is impossible to answer unless you define exactly what you mean by "a lot". Do you mean the one moving average stays above the other for a defined number of candles, or it moves such that it is a defined number of pips, or other value, above the second moving average?
        When creating an EA I always find it useful to write out exactly what I expect it to do before I start the project. This helps me define exactly what blocks to use and how to use them. If you can't define exactly the action the EA should take it will be difficult, if not impossible, to write the code or create using fxDreema.

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

          @cpbonzo said in moving average crossover method.:

          yes, I mean the one moving average stays above the other for a defined number of candles, or pips. yes.. How would i block that?

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

            The condition block has an option to adjust the value on each side of the condition. So, for example, you could have your faster MA on the left and the condition is that this is greater than the slower moving average on the right. The block works by comparing the value of the left side to the value of the right side.

            If in the adjust box for the right side you put +0.2 then 0.2 will be added to whatever the value is of the moving average at the specified point in time. If you put +2pips in the box it will add twice the pip value (which will depend on the instrument) to the value of the MA. For example, if the slower MA value at the previous candle time was 0.9031 and you have +2pips in the adjust box the value of that side of the condition becomes 0.9033. Therefore if you set the candle ID for both sides to 1 the condition block will pass if the value of the faster MA at the previous candle completion is greater than 0.9033 which is the value of the slower MA plus two pips.

            M 1 Reply Last reply Reply Quote 0
            • M
              mrfilthy11 @CPBonzo last edited by

              @cpbonzo can you please please show an example? you just lost me in that explanation . I kind of understand.. But it was so literal and amazing.. But I go lost

              C 1 Reply Last reply Reply Quote 0
              • C
                CPBonzo @mrfilthy11 last edited by

                @mrfilthy11 I see you have asked similar questions on other posts and that @ambrogio has already provided an example of how to adjust the value here: https://fxdreema.com/forum/topic/10174/moving-average-crossover

                M 1 Reply Last reply Reply Quote 0
                • M
                  mrfilthy11 @CPBonzo last edited by

                  @cpbonzo but all that did was start the trade candles later.. is that what's supposed to happen?

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

                    Yes, you asked how to ensure the price had crossed the moving average a lot and in most circumstances that means the condition is met by a later candle than if you just wanted the moment the moving average was actually crossed.

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

                    Online Users

                    O
                    J
                    B
                    M

                    12
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors