Announcement

Collapse
No announcement yet.

color coding ergodic

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • color coding ergodic

    I am trying to color code mt ergodic indicator so that it turns green when its increasing and tirns red while its decresing. to accomplish this purpose i introduced a new varaible called ecoold which should refer to the previous. This doesnt seem to be working. Can soneone take a look at my efs and help me figure out what i am doing wrong here thanks.
    Thanks,
    Yoda
    Attached Files

  • #2
    You were returning before you did the ecccold<eco comparasion
    Attached Files

    Comment


    • #3
      dloomis,
      thanks it works great
      yoda

      Comment


      • #4
        When i apply that efs it color codes the ergodic but it it always one bar too late. for example if the ergodic is increasing it wont color code it till the next bar. Can someone please download the blau.efs and show me what i can do to correct this error.
        Thanks

        Comment


        • #5
          yoda
          It actually is not one bar late, it only appears to be so because the bar is plotted on the extreme left of the spacing.
          If you look at the attached image you will see that I have also plotted the backgrounds of the price bars with the same color as the eco and the bar in which the condition is met is correctly painted in green. That in fact is the first point in which the eco is greater than ecoold. The red color to the right of the low still refers to the low point plot where the eco was still less than ecoold.
          Alex
          Attached Files

          Comment


          • #6
            Alexis,
            I see your point so is there a way to have the ergodic color green if its risng or color red if its falling as thats what im trying to achieve.
            Yoda

            Comment


            • #7
              yoda
              It already does that mathematically except that it "appears" not to be like that because of the line that joins the points.
              Try to plot as dots instead of a line (so that you don't see the "joining segment") and you will see what I mean.
              To plot as dots add
              setPlotType(PLOTTYPE_DOT);
              to your premain().
              Alex

              Comment


              • #8
                Hi,

                I need a little help.
                Based on the efs script for Blau's ergodic (see script below from yodajudge) I need a WEIGHTED average line.

                How can I calculate this WEIGHTED average on ergodic? Average value is 2 or 3.
                Thanks for help.

                Guido

                Comment

                Working...
                X