fxDreema

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

    First green/red bar above/below MA

    Questions & Answers
    3
    9
    2425
    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.
    • F
      Flip last edited by

      Hello,

      Can you please point me in the direction for the following.

      I want that the indicator spots only the first red or green closed bar above MA.

      In this picture you see an example where the first red bar has closed above the MA:

      0_1490089302783_upload-70592aeb-8775-4a2e-9f1d-ea1071e9dc67

      Thank you in advance.

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

        use condition block where you set Candle Low is above MA ... this will automatically means that candle is above MA ... next condition is to detect if candle is bear or bull (there are more ways for this, one can be condition block where you compare Candle_Open < Candle_Close which means bull candle) ...

        next before all this conditions you need something what is called switch ... because you need only first candle above/below ... this switch can be done easily using flag state (or variables) ... just save state when Candle Close id 2 was below MA and Candle_Close id is above MA - set switch to Up, when opposite - to down ....
        and now when switch (flage) state is up, you will wait for first candle above MA, when this happens, set switch to neutral and wait when candle closes below MA (to switch down and start looking for first candle below MA) ...
        .
        are you able do it?

        Between trading and gambling is a very small gap, be careful.

        1 Reply Last reply Reply Quote 0
        • F
          Flip last edited by

          Thanks for the response. I tried as far as I could understand but nothing seems to happen.

          This is what I have come up with: https://fxdreema.com/shared/Y2xQHQg0e

          Can you please point me in the right direction?

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

            instead of flags you can use variables ... but it is working with same logic ...
            and this is probably working ...
            maybe sometimes signal can be skipped, it is metatrader 😄 ...

            https://fxdreema.com/shared/Aeoa13t8e

            0_1490294127783_upload-cfe696e8-75d7-4eab-8900-b0324da0eba8

            Between trading and gambling is a very small gap, be careful.

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

              and here the same with flags:
              https://fxdreema.com/shared/tq1Kawnod

              Between trading and gambling is a very small gap, be careful.

              1 Reply Last reply Reply Quote 0
              • F
                Flip last edited by

                Thanks a lot for your work. I tested both ways, but for some reason nothing seems to be happening, any idea what it could be?

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

                  I tried your project and this happens: http://prntscr.com/epnzo5 Obviously there are some arrows, it's not "nothing"

                  1 Reply Last reply Reply Quote 0
                  • F
                    Flip last edited by

                    I tried again using the project Miro created, still nothing.... so I am not getting arrows. I see status showing: waiting for tick....

                    Probably a rookie mistake on my side🙈 , If you have an idea what I am missing please let me know.

                    Cheers.

                    1 Reply Last reply Reply Quote 0
                    • F
                      Flip last edited by

                      Ok I found out why it didn't work for me, I had to place the blocks in 'On Charts' not 'On tick'.

                      So all is fine now;)

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

                      Online Users

                      F
                      W

                      6
                      Online

                      146.8k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors