Announcement

Collapse
No announcement yet.

Pdi Ndi

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

  • Pdi Ndi

    I'm trying to convert an efs to efs2 and also to plot color when above 0 to be lime and below 0 to be red, in need of some help to get it working correctly.

    Peter
    Attached Files

  • #2
    For what its worth here is a novices rendition.

    see attached.
    Attached Files

    Comment


    • #3
      thanks Wayne, I wouldn't consider you a novice. Writing a script isn't my strong point but you seem to have a good knowledge of that.

      Peter

      Comment


      • #4
        Wayne,

        I'm trying to get the indicator to plot similar to enclosed pic to save space on chart. I've changed histogram to Square but it still plots somewhat like a histogram instead of just plotting along axis and displaying number value. Can this be achieved and what changes do I need to make.

        Peter
        Attached Files

        Comment


        • #5
          Peter,

          I haven't gotten that far yet but it sounds interesting. What efs or program did that image come from?

          Comment


          • #6
            Wayne, the screenshot is from another software and I'm sure that the pdindi won't be able to plot exactly like the screen shot but using Square instead of Histogram will do but the Square plot is still displayed similarly like the Histogram but in a squre box. If there is any way to get the Square to just plot along a straight line (ie. the zore line) like the screenshot and display number value would be great. I enclosed the Squre plot efs.
            Attached Files

            Comment


            • #7
              try this
              Attached Files

              Comment


              • #8
                Wayne, that solves the plotting of square but the diff. between previous bar is off on the color at times. I've changed the plot study to -75 to 75 and trying to plot color based on value of pdindi as outlined in lines 156 - 164 of enclosed efs but get errors
                Attached Files

                Comment


                • #9
                  if (PdiNdi > 0){
                  if(PdiNdi >= 0 < 5) setBarFgColor(lime);
                  if(PdiNdi >= 5 < 15) setBarFgColor(green);
                  if(PdiNdi >= 15) setBarFgColor(darkgreen);
                  }
                  if (PdiNdi < 0){
                  if(PdiNdi <= 0 > -5) setBarFgColor(Color.RGB(249,120,146));
                  if(PdiNdi <= -5 > -15) setBarFgColor(red);
                  if(PdiNdi <= -15) setBarFgColor(maroon);
                  }

                  Comment

                  Working...
                  X