Announcement

Collapse
No announcement yet.

Can Ehlers Inst. Trend Line Plot as Hist?

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

  • Can Ehlers Inst. Trend Line Plot as Hist?

    Hello to all the code writers here at eSignal. And thanks for all your past help.

    Can Ehlers instantaneous Trend Line be plotted as a historgram in blue for when the blue line is above the red and red when the red line is above the blue?

    Russ
    Attached Files

  • #2
    Russ
    In preMain() add the following

    setPlotType(PLOTTYPE_HISTOGRAM,0);
    setHistogramBase(0);


    Then in main() just above the return new Array (Trendline, value11) add the following

    var vHist = value11-Trendline;
    if(vHist>0)
    setBarFgColor(Color.blue);
    if(vHist<0)
    setBarFgColor(Color.red);


    Lastly replace return new Array (Trendline, value11) with

    return vHist;

    I believe that should do it.
    Alex

    Comment


    • #3
      Alex,

      Thanks again.

      It doesn't plot as a histogram but I think the way you have it coded is even better.

      Russ
      Attached Files

      Comment


      • #4
        Russ
        It does not plot as a histogram because you did not add the statements in preMain() (see my prior reply)
        Alex

        Comment


        • #5
          Alex,
          You had it right..I left out the first part of your code.
          My mistake.
          Russ
          Attached Files

          Comment

          Working...
          X