fxDreema

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

    "Cross width" Clarification For Indicators

    Questions & Answers
    6
    18
    7858
    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.
    • P
      Paul 5 last edited by

      Hello all,
      as a newbie I create a EA where the triggers for open a trade are :
      -check if MA10 cross above MA20
      -check if MA10 is above MA20
      Same thing for Sell order.
      It is fine what I've done or is garbage?

      Now, 1 thing that I am not understand very well:
      How can avoid weak signals who just cross above and below multiple times, which trigger my EA but is not profitable.
      I've tried to use ADX,RSI and STO to get a strong signal,but still workaround.
      Here is the project:
      https://fxdreema.com/shared/xW65Xoqyd

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

        Hello, can you please provide an example of what increasing width will do? If you set it to 3 instead of 1, does it search for crossovers in the previous 3 bars instead of just the current bar? Or does it search for crossovers only in bar 3 (i.e. three bars ago)? Also, a newbie question but are bars the same as candles?

        Thank you.

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

          "cross width"? This is very simple one that I have to update, now it just allows you to compare the current candle with candle+cross width. Normally for crossover you want to check candle X with candle X+1. In the block it's actually candle X with candle X+cross width. If cross width is 3, 4, 5... the candles in between are not checked at all, at least at the moment 🙂

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

            sorry, I'm still not understanding. If cross width is not the number of candles to check going backwards, what unit of measurement is cross width - is it a time value where 3 is units of whatever timeframe you are in? Thanks

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

              Cross width is number of candles between both crossover points. To mention again, the candles in between are not used in this type of crossover, but maybe I will do it that way in future. Now it is simple as that:

              • Line A crosses Line B below when: A[new bar] < B[new bar] and A[new bar + cross width] > B[new bar + cross width]
              • Line A crosses Line B above when: A[new bar] > B[new bar] and A[new bar + cross width] < B[new bar + cross width]
              1 Reply Last reply Reply Quote -1
              • T
                Trader3487 last edited by

                cross width.png
                so "new bar + cross width" is # of bars going back? See attached screenshot. And just to confirm - I know you said that the candles in between are not check - if crossover happened at candle 1-5, then statement would not be true?

                ......
                cross width.png

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

                  Initially there was the normal crossover only, where second condition is added - the opposite one for the previous candle. Then someone asked something about some distance while checking crossover, and I added this option. It's really just shifting the second condition - instead of checking two values on the previous bar, it checks two values on some other bar.

                  Normal case with cross width = 1, MA5[1] x> MA10[1] selected:
                  MA5[1] > MA10[1] AND MA5[2] < MA10[2]

                  Detailed, using cross width:
                  MA5[1] > MA10[1] AND MA5[1+crosswidth] < MA10[1+crosswidth]

                  If crosswidth is for example 100, only candle 1 and 101 will be checked, not candles in between, two checks only. That means that this option is maybe not really useful, but I will probably play with it later. Maybe it will be better if it helps to check if there was crossover in the past "cross width" candles.

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

                    got it now, thanks 🙂

                    Yes, checking a range of previous candles would be more useful.

                    just to clarify, the number 1 in candle[1] means current candle - same meaning but different numbering than close[0] where 0 is current candle?

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

                      Candle 0 is the current one, 1 is the previous... and so on.

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

                        so when you say "Normal case with cross width = 1, MA5[1] x> MA10[1] selected", that means crossover is happening in previous candle. If I want to detect crossover in current candle, wouldn't it have to be cross width = 0, MA5[0] x> MA10[0] - but there is no option for zero?

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

                          Condition left operand: MA5[0]
                          Condition right operand: MA10[2]
                          cross width: 1 (default)
                          crossover model: x>

                          conditions checked by this block:
                          MA5[0]>MA10[2] and MA5[0+crosswidth]<MA10[2+crosswidth]

                          or just...
                          MA5[0]>MA10[2] and MA5[1]<MA10[3]

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

                            thanks for the additional information. I also reviewed the crossover documention here: http://fxdreema.com/documentation/proje ... er%20works

                            Using the method you provided, it still looks like the crossover is being detected a bar later than it actually happens (crossover happens in bar 1). I am looking for a way to detect crossover in current bar, which I guess just detects when line A meets line B, i.e. MA20[0] == MA40[0]. I tried setting up an arrow on the chart with this condition but it did not work (it detects first 2 crossovers and then stops):
                            http://fxdreema.com/shared/uW1Mhf3se Any ideas why?

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

                              Try with visual testing to see what happens really if you prefer. I just checked how crossover works for candle ID = 0 and it seems fine.

                              And never use == to compare price values. Using this you will always miss something, because the chance to have two values exactly the same at the same time is not very big. Values are not 1, 2 or 3, they are like 1.23456, 1.23457, 1.23459... who can guarantee that 1.23458 will be there?

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

                                oh, that's a good point. I did try with visual testing but that explains why it was missing most of the crossovers using the == method. Would you be able to attach an example ea showing the crossover at candle id = 0, I tried putting it together but it still shows crossover a bar behind. Thanks 🙂

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

                                  http://fxdreema.com/shared/PI45RIZXc

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

                                    @paul-5 Your trailing stop is checked between buy and sell launchers. I recommend you to exchange its ID number with block 55. That way it'll be checked after both launchers.

                                    On the other hand, I'm afraid I'm not good at all at giving advice on profitable strategies, sorry 😞

                                    (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
                                    • G
                                      goldis @fxDreema last edited by

                                      @fxdreema : how to check if crossover is occurring in either candle 1 or 2 or 3 or 5 or nth candle . if i put 5 as cross width, then does the updated fxdreema now allow me to check crossover in the previous 5 candles ?

                                      thanks in advance.

                                      jstap 1 Reply Last reply Reply Quote 0
                                      • jstap
                                        jstap @goldis last edited by

                                        @goldis No it won't, easiest way is candle cross on 1 pass, if not connect yellow to another condition, if yes pass, if not check 3, etc until all candle numbers are checkd.

                                        Learn fxDreema Without the Wait!

                                        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                        Don’t miss out

                                        Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                        Enjoy! 😊

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

                                        Online Users

                                        H
                                        N
                                        J
                                        A
                                        Z

                                        15
                                        Online

                                        146.7k
                                        Users

                                        22.4k
                                        Topics

                                        122.6k
                                        Posts

                                        Powered by NodeBB Forums | Contributors