Vary line color by slope
Author: karla2010
Creation Date: 1/1/2012 10:15 AM
profile picture

karla2010

#1
Happy New Year.

I would like to vary the line color of a smooth indicator based on its slope. Let's say slp[ibar] measures the slope of the line and if slp>valp the line is green, if slp<valm the line is red, and if valm<slp<valp then the line is yellow.

Any idea how I can do this?
profile picture

Eugene

#2
Happy New Year.

Ideas:

* Wiki > Indicators | Plot Oscillators with Different Shades of Colors
* QuickRef > SetSeriesBarColor, SetPaneBackgroundColor

profile picture

karla2010

#3
Thanks, SetSeriesBarColor does the trick.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).