This is a repost from the Yahoo's thinkScript group.
Video
Has anyone here got a thinkscript that places the Hima Reddy Bear Support (20 to 30) and Bear Resistance (55 to 65) Zones and Bull Support (40 to 50) and Bull Resistance (80 to 90) Power Zones on the RSI Indicator? I would appreciate receiving the code if you do...
thinkScript Code
Code:
#-----------------------------#
# ---- By Syracusepro ----#
declare lower;
#A: With RSI on a 14 period setting (this is crucial!)
#Bull Resistance Power Zone = 80 to 90
#Bear Resistance Power Zone = 55 to 65
#Bull Support Power Zone = 40 to 50
#Bear Support Power Zone = 20 to 30
def hm_RSI = RSI();
plot himma = hm_rsi;
plot bullRes = 90;
bullRes.setDefaultColor(color.green);
plot bullResb = 80;
bullResb.setDefaultColor(color.green);
plot bearRes = 70;
bearRes.setDefaultColor(color.red);
plot bearResb = 60;
bearResb.setDefaultColor(color.red);
plot bullSupp = 50;
bullSupp.setDefaultColor(color.green);
plot bullSuppb = 40;
bullSuppb.setDefaultColor(color.green);
plot bearSupp = 30;
bearSupp.setDefaultColor(color.red);
plot bearSuppb = 20;
bearSuppb.setDefaultColor(color.red);
#------------------------------#
Fancy Version
Code:
#-----------#
declare lower;
#--------------- Relative Strength Index" -------------#
#----- Translated from pinescript to thinkscript ------#
#----------------- by Syracusepro ---------------------#
input src = close;
input len = 14; #"Length"
plot rsi = rsi(len, close);
plot band1 = 70;
plot band0 = 30;
#addCloud(band1, band0, color.magenta);
plot h1 = 20;
h1.setDefaultColor(color.red);
plot h2 = 30;
h2.setDefaultColor(color.red);
plot h3 = 40;
h3.setdefaultColor(color.green);
plot h5 = 55;
h5.setDefaultColor(color.red);
plot h6 = 65;
h6.setDefaultColor(color.red);
plot h7 = 80;
h7.setdefaultColor(color.green);
plot h8 = 90;
h8.setdefaultColor(color.green);
plot h9 = 50;
h9.setdefaultColor(color.green);
addCloud(h1,h2, color.red, color.red);
addCloud(h3,h9, color.green, color.green);
addCloud(h5,h6, color.red, color.red);
addCloud(h7,h8, color.green, color.green);
#-----------#
Video