Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing the value of a slope indicator

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

    Accessing the value of a slope indicator

    Hello,
    I am trying to plot the slope of HoltEMA. I already have the slope and HoltEMA indicators. Both the indicators are attached.

    I want to achieve the following by either writing a brand new indicator or by adding a code snippet in existing Slope indicator.

    - Whenever the value of HoltEMA's slope is more than 5 bar color turns yellow and if less than -5, bar color turns blue

    I added the following code the existing slope indicator, but I am not able to accomplish what I want.

    if (PlotUp[0] >=5)
    {
    BarColor = Color.Yellow;
    }
    if (PlotDn[0] <=-5)
    {
    BarColor = Color.Blue;
    }

    Can someone please help me with what am I doing wrong here.
    Very much appreciate your help in advance.
    Attached Files

    #2
    pandyav, where exactly did you add that logic to color into the slope script? Testing the same setup I don't see any issue here, would perhaps help as well to mark up your levels on the slope via horizontal lines to see when the conditions should trigger for you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X