How can I set color of RSI oversold or overbought zones?
Author: mrsic
Creation Date: 9/28/2017 2:33 PM
profile picture

mrsic

#1
Hi,
Could someone please check this Strategy for me. I am not a programmer but i do my best.

CODE:
Please log in to see this code.


@ how can i set a color here (RSI) instead of a bar? See Picture.

thanks.

greetings damir.
profile picture

Eugene

#2
Hi Damir,

QUOTE:
@ how can i set a color here (RSI) instead of a bar? See Picture.

Since by "here" you mean oversold/overbought areas I've renamed topic's title accordingly. For a how-to please refer to PlotSeriesOscillator in the QuickRef. And here's a nice example of the method's application to create multi-level shading:

Indicators | Plot Oscillators with Different Shades of Colors


QUOTE:
Could someone please check this Strategy for me

From a syntax standpoint, it looks OK on the surface.
profile picture

mrsic

#3
Hi Eugene,

QUOTE:
From a syntax standpoint, it looks OK on the surface.

Thanks.

QUOTE:
Since by "here" you mean oversold/overbought areas I've renamed topic's title accordingly. For a how-to please refer to PlotSeriesOscillator in the QuickRef. And here's a nice example of the method's application to create multi-level shading:

I have expressed myself wrong. I did not think of shading within the oscillator. If i set Color for one Bar than i like to see a piece of the line also in a color. See another Picture.
Do you know what i mean?

profile picture

Eugene

#4
Damir,

Then SetSeriesBarColor should do the trick. See the QuickRef code example.
profile picture

Cone

#5
Better yet, use PlotSeriesOscillator. The example in the QuickRef even uses RSI.
profile picture

mrsic

#6
Thanks Eugene & Cone.

Greetings Damir.
profile picture

mrsic

#7
Hi,

i am not a programmer but i give my best. Could someone check this for me, please.
PlotSeriesOszillator. I dont know how to make it better for long and short.

CODE:
Please log in to see this code.


greetings damir
profile picture

Eugene

#8
Damir, if you "don't know how to make it better for long and short", how can we help? :) A good question contains half the answer. I simply don't know what "better" means to you. What is the problem or your objective?
profile picture

mrsic

#9
Hi Eugene,

ist the PlotSeriesOszillator correct programmed? Because i have seen in the example there ist one line for boths Overbought and Oversold and one Lookback for both (14). I have two different lookbacks.

Example:
CODE:
Please log in to see this code.


greetings damir
profile picture

Eugene

#10
As you can find in the QuickRef, PlotSeriesOscillator is intended to highlight overbought and oversold levels in color. It's up to your visual comfort to plot the two RSIs on one pane (rsiPane) or maybe use a separate pane for each RSI version.