Announcement

Collapse
No announcement yet.

MA Direction Change

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MA Direction Change

    What is missing in this code. The bars don't print until I get another flag. I would like to just change the MA color instead of flaging the change. But haven't figured it out yet.

    Russ
    Attached Files

  • #2
    Russ
    That is happening because you color the price bars only when the first two conditions are not true.
    Remove Set3 from the efs and it will work correctly
    Alex

    Comment


    • #3
      Russ
      With regards to coloring the average you need to use setBarFgColor() and apply that everytime (see example)
      Alex

      Comment


      • #4
        Alex,

        I have looked at this til I am about to go blind.

        This is working correct for the down side but not for the up side. I have add the chart below to show what I mean.

        I have also removed the arrows and juat change the MA color. I will post the new Formula.

        Thanks
        Russ
        Attached Files

        Comment


        • #5
          This is the new Formula.
          Attached Files

          Comment


          • #6
            Russ
            Set1 and Set2 are evaluating different conditions. Also remove Set3 or change it to paint the MA when either Set1 or Set2 do not return true
            Alex

            Comment


            • #7
              Alex,
              Made the changes per your last post.

              However, they didn't make any differance to the chart. I am sorry to be such a bother.

              Russ
              Attached Files

              Comment


              • #8
                Russ
                It is working correctly. The problem is that you use aqua as the default color of the MA which is the same (or very similar) to the color used when Set1 is true. Change the default color and you will see that it works
                Alex

                Comment


                • #9
                  Alex,
                  It is working now.

                  Peace by peace may be I will figure out Formula Wizard.

                  Thanks couldn't have done without you.

                  For anyone else interested here is the formula.

                  Russ
                  Attached Files

                  Comment


                  • #10
                    Russ
                    You are most welcome
                    Alex

                    Comment


                    • #11
                      similar efs

                      Hello

                      Is there a similar efs to the one below that simply colors any MA up one color and down one color just based on price cross alone. I thought I have seen one in esignal, but knowledge base search on "color" and "color ma" or "color moving averages" comes up empty?

                      Thanks

                      Pogman

                      Comment


                      • #12
                        found it here

                        I found it not in the knowledge base but in efs studies search.
                        those interested I have attached it below.

                        Regards

                        Pogman
                        Attached Files

                        Comment


                        • #13
                          Pogman
                          FWIW that script will not color the moving average based on price being above/below the average but on the average being higher/lower than its prior value. If you want the average to be colored based on price being above/below the average replace the conditions in lines 29-32 with the ones enclosed below
                          Alex

                          PHP Code:
                          if (vMA.getValue(MAStudy.MA) > close(0))
                              
                          setBarFgColor(Color.red);
                              if (
                          vMA.getValue(MAStudy.MA) < close(0))
                              
                          setBarFgColor(Color.blue); 

                          Comment


                          • #14
                            Hello

                            Alex you are very sharp indeed! You never cease to amaze me. I had not caught this yet! Replacing the code with your suggestions make it work as it should. Thank you for taking the time to offer your correct suggestion, you are the greatest!

                            For those interested I have attached the efs that color's a ma above and below price.

                            Thanks and have a great weekend.

                            Pogman

                            P.S. On a side note my clicking on eSignal spell check does not work anymore, is anyone else having this issue or just me?
                            Attached Files

                            Comment


                            • #15
                              Hello pogman,

                              The spell check feature is currently broken.
                              Jason K.
                              Project Manager
                              eSignal - an Interactive Data company

                              EFS KnowledgeBase
                              JavaScript for EFS Video Series
                              EFS Beginner Tutorial Series
                              EFS Glossary
                              Custom EFS Development Policy

                              New User Orientation

                              Comment

                              Working...
                              X