fxDreema

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

    Inconsistent Results

    Questions & Answers
    2
    13
    1811
    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.
    • T
      Trader3487 last edited by

      Hi,

      Do you know why this ea is responding to some crossovers but not others? There are candles where candle close[0] definitely crosses below ma3 but the ea does not pick it up. For example, 25-feb-14 on the D1 TF. Also, 17-jan-14, 01-aug-2000 on the D1 TF. Does the candle need to cross over the ma3 line a certain amount in order to trigger the orange output of block 1? What I noticed is that if the candle previously in the bar crossed over ma3 a little bit and then crosses over again, the orange output of block 1 will not pass.

      http://fxdreema.com/shared/tYv47Gn1e

      Thank you 🙂

      1 Reply Last reply Reply Quote 0
      • T
        Trader3487 last edited by

        ... follow up thought from previous post: what is the difference between using the cross below symbol "X<" and the below "<" symbol? When I use "<" in the above example instead, it gives accurate results. In general, isn't the candle "going below" the ma3 technically a crossover?

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

          Crossover is to have Close[0] below MA3[0] and Close[1] above MA3[1]. This is what I got: http://prntscr.com/2rrx6g
          On 17 jan Close is deep below MA3, but Close of 16 jan is also below. At least this is the algo that is used now, which is maybe not "correct" in every situation. If for example we have to compare Close[0] with MA[0] and Open[0] with MA[0], maybe another wrong situations will appear. There is another possible way - to compare the current Bid with the current MA and the previous Bid with the current MA, and this will give us 1-time signals... I think this is for a block like "Price cross indicator".
          Obviously there are number of ways to do something. What is the right way to detect crossover in your opinion?

          1 Reply Last reply Reply Quote 0
          • T
            Trader3487 last edited by

            ok interesting. need to digest this info. and will get back about what I think is the right crossover algorithm

            1 Reply Last reply Reply Quote 0
            • T
              Trader3487 last edited by

              when I think of crossover, I think of simply "does indicator A cross over indicator B at a given point?" so comparing this to the previous candle's close would make this statement false if candle[1]'s close is also "crossed over" ma3. But translating the above statement to "is indicator A < indicator B" will be true every tick even after candle crosses over ma3. So:

              __compare the current Bid with the current MA and the previous Bid with the current MA, and this will give us 1-time signals... I think this is for a block like "Price cross indicator".[/quote:3cozblbe]
              yes, I think this is the right way

              and, as before, instead of "crossover width" option, I think the best thing is to have an option to check for crossover in previous n ticks/bars/minutes, etc. (in addition to detecting crossover in current tick)

              1 Reply Last reply Reply Quote 0
              • T
                Trader3487 last edited by

                I tried to build it but it's not working correctly - it is drawing an arrow even if previous tick was not on opposite side of ma3:

                http://fxdreema.com/shared/ZavPlA6Uc

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

                  I think in your project you don't need to set MA shift to 1

                  1 Reply Last reply Reply Quote 0
                  • T
                    Trader3487 last edited by

                    I set it back to 0 but it's still not working.

                    Out of curiousity, is there a way to specify previous tick for indicators?

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

                      No. Normally there is no way to set previous tick for price, but I added a function to collect this data, which also makes the EA to run a bit slower on backtest 🙂 It's not impossible in theory, but is it needed?

                      I have some arrows out of this project with MA shift 0 😮

                      1 Reply Last reply Reply Quote 0
                      • T
                        Trader3487 last edited by

                        it's drawing arrows before crossover happens (see screenshot). Previous tick for MA would be useful in order to make the crossover detection accurate. Otherwise, wouldn't it be comparing bid tick[1] with ma3 tick[0]?

                        ......
                        ScreenClip.png

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

                          Ah, this is because the compare sigh in block 1, it's wrong. But otherwise I found that the returned value of tick 1 is the same as tick 0. Try with tick 0 and 2, or even bigger difference.

                          1 Reply Last reply Reply Quote 0
                          • T
                            Trader3487 last edited by

                            oops - good eyes. I corrected the sign in block one and now it detects the crossovers even with tick 1 but something is still not correct because it's drawing many arrows on the same tick/second (see attached screenshots of journal and chart). In the meantime, I built the crossover system using candle close[0], "<", variables and counters and it works exactly right. The "price cross indicator" block as you suggested comparing bid and MA of current and last bar would still be preferable. If tick 0 and tick 1 are the same then orange output would not pass but wouldnt' there have to be cases where tick 0 is less than tick 1?

                            ......
                            multiple arrows.png
                            journal.png

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

                              I think this is because MA also goes up/down when the price goes up/down and the crossover extends itself. Maybe Once per bar can help? Or maybe some tolerance.

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

                              Online Users

                              E
                              V

                              23
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors