RSI Support/Resistance Zones


Category:
0
0

Hi Pete,

Please code RSI (14) with multiple horizontal color lines to identify support and resistance zones.

Sell Resistance Zone: 55 – 65 (red color)

Sell Support Zone: 20 – 30 (red color)

Buy Resistance Zone: 80 – 90 (green color)

Buy Support Zone: 40 – 50 (green color)

zone 66-79 (white color since my chart background is black)

Code with option to change color of lines.

Thank you.

Kim

Marked as spam
Posted by (Questions: 23, Answers: 57)
Asked on March 15, 2018 6:31 pm
1124 views
0

I think I meant zone 66-79 color black even though my chart background is black, since TOS has the numbers as white color.

( at March 15, 2018 6:35 pm)
0
Private answer

Here you go:

declare lower;
input length = 14;
input over_Bought = 70;
input over_Sold = 30;
input price = close;
input averageType = AverageType.WILDERS;
input showBreakoutSignals = no;
plot rsi = RSI(length, over_Bought, over_Sold, price, averageType, showBreakoutSignals).RSI;
rsi.DefineColor("OverBought", GetColor(5));
rsi.DefineColor("Normal", GetColor(7));
rsi.DefineColor("OverSold", GetColor(1));
rsi.AssignValueColor(if rsi > over_Bought then rsi.color("OverBought") else if rsi < over_Sold then rsi.color("OverSold") else rsi.color("Normal"));
DefineGlobalColor("High Bearish", Color.RED);
DefineGlobalColor("Low Bearish", Color.RED);
DefineGlobalColor("High Bullish", Color.GREEN);
DefineGlobalColor("Low Bullish", Color.GREEN);
DefineGlobalColor("None", Color.WHITE);
AddCloud(if !IsNaN(close) then 65 else Double.NaN, if !IsNaN(close) then 55 else Double.NaN, GlobalColor("High Bearish"), Color.BLACK);
AddCloud(if !IsNaN(close) then 30 else Double.NaN, if !IsNaN(close) then 20 else Double.NaN, GlobalColor("Low Bearish"), Color.BLACK);
AddCloud(if !IsNaN(close) then 90 else Double.NaN, if !IsNaN(close) then 80 else Double.NaN, GlobalColor("High Bullish"), Color.BLACK);
AddCloud(if !IsNaN(close) then 50 else Double.NaN, if !IsNaN(close) then 40 else Double.NaN, GlobalColor("Low Bullish"), Color.BLACK);
AddCloud(if !IsNaN(close) then 79 else Double.NaN, if !IsNaN(close) then 66 else Double.NaN, GlobalColor("None"), Color.BLACK);

Screenshot below shows how it looks on a chart of black background.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on March 15, 2018 7:45 pm
0

Great job! Thank you, Pete.

( at March 15, 2018 8:38 pm)