How to change the color of PlotSeries
Author: Compaqster
Creation Date: 11/8/2010 5:13 AM
profile picture

Compaqster

#1
I want to write Super Trend Indicator
CODE:
Please log in to see this code.

I have a problem
How can I change the color supertrend line, when supertrend will be higher or lower prices?
profile picture

Eugene

#2
Call PlotSeries first, then call SetSeriesBarColor to set color for individual bars of your superTrend series.
CODE:
Please log in to see this code.
profile picture

Compaqster

#3
Thank you Eugene.
I made a small change in the code, and got a big problem. =)
I use KAMA to smooth superTrend.
This code works as expected.
CODE:
Please log in to see this code.

but when I add another time interval, I can not change the color
CODE:
Please log in to see this code.
profile picture

Cone

#4
It's not possible to plot anything in a scale that's different than the underlying chart scale.

In other words, you have to RestoreScale() before you do cosmetic chart operations. See the WealthScript Programming Guide or the Wiki for examples of multi-timeframe operations.
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).