Quicksilver80

Super Stoch

Added signal functionality to StochRSI 2
Set Default Resolution of StochRSI 1 to "D" and StochRSI 2 to "240"
Remove from Favorite Scripts Add to Favorite Scripts
//  Originally scripted by ChrisMoody on October 23, 2014 for user platinumFX
//  Retooled by Quicksilver
//  Set Default Resolution StochRSI 1 to "D" and StochRSI 2 to "240"
//  Added signal functionality to StochRSI 2

study(title="Super Stoch", shorttitle="SS 2.0")

// Upper, Middle, and Lower line display options
midLine = input(true, title="Show Mid Line?")
upLine = input(70, minval=50, maxval=90, title="Upper Line")
lowLine = input(30, minval=10, maxval=50, title="Lower Line")


// Stoch 1 
// Signal Display Options
sch1 = input(true, title="Stoch1 Strict Crossing Background Hi-Lights?")
sl1 = input(true, title="Stoch1 Strict Crossing Display 'B' and 'S'?")
sac1 = input(false, title="Stoch1 All Crossings Background Hi-Lights?")
sacl1 = input(false, title="Stoch1 All Crossings Display 'B' and 'S'?")
// Stoch 1 Parameters
len = input(14, minval=1, title="Stoch1 Len") 
smoothK = input(3, minval=1, title="Stoch1 K")
smoothD = input(3, minval=1, title="Stoch1 D")
res = input(title="Stoch1 Resolution", type=resolution, defval="D")
//  Stoch 1 formula
k = sma(stoch(close, high, low, len), smoothK)
d = sma(k, smoothD)
outK = security(tickerid, res, k)
outD = security(tickerid, res, d)
// Strict Crossing Definitions
aboveLine = outK > upLine ? 1 : 0
belowLine = outK < lowLine ? 1 : 0
crossUp = (outK[1] < outD[1] and outK[1] < lowLine[1]) and (outK > outD)  ? 1 : 0
crossDn = (outK[1] > outD[1] and outK[1] > upLine[1]) and (outK < outD) ? 1 : 0
// Definition For Any Crossing
crossUpAll = (outK[1] < outD[1] and outK > outD) ? 1 : 0
crossDownAll = (outK[1] > outD[1] and outK < outD) ? 1 : 0

// Stoch 2 
// Signal Display Options
sch2 = input(true, title="Stoch2 Strict Crossing Background Hi-Lights?")
sl2 = input(true, title="Stoch2 Strict Crossing Display 'B' and 'S'?")
sac2 = input(false, title="Stoch2 All Crossings Background Hi-Lights?")
sacl2 = input(false, title="Stoch2 All Crossings Display 'B' and 'S'?")
// Stoch 2 Parameters
ssStoch = input(true, title="Show Stoch2 ?")
useCurrentRes2 = input(false, title="Use current timeframe For Stoch2 ?")
resCustom2 = input(title="Stoch2 Resolution", type=resolution, defval="240")
len2 = input(14, minval=1, title="Stoch2 Len")
smoothK2 = input(3, minval=1, title="Stoch2 K")
smoothD2 = input(3, minval=1, title="Stoch2 D")
res2 = useCurrentRes2 ? period : resCustom2
//  Stoch2 formula
k2 = sma(stoch(close, high, low, len2), smoothK2)
d2 = sma(k2, smoothD2)
outK2 = security(tickerid, res2, k2)
outD2 = security(tickerid, res2, d2)
// Strict Crossing Definitions
aboveLine2 = outK2 > upLine ? 1 : 0
belowLine2 = outK2 < lowLine ? 1 : 0
crossUp2 = (outK2[1] < outD2[1] and outK2[1] < lowLine[1]) and (outK2 > outD2)  ? 1 : 0
crossDn2 = (outK2[1] > outD2[1] and outK2[1] > upLine[1]) and (outK2 < outD2) ? 1 : 0
// Definition For Any Crossing
crossUpAll2 = (outK2[1] < outD2[1] and outK2 > outD2) ? 1 : 0
crossDownAll2 = (outK2[1] > outD2[1] and outK2 < outD2) ? 1 : 0

// Plot Lines
p1 = plot(upLine, title= "Upper Line", style=solid, linewidth=1, color=gray)
p2 = plot(lowLine, title= "Lower Line", style=solid, linewidth=1, color=gray)
plot(midLine and 50 ? 50 : na, title="Mid Line", style=linebr, linewidth=1, color=gray)

// BackGroound Color Plots
bgcolor(sch1 and crossUp ? lime : na, transp=80)
bgcolor(sch1 and crossDn ? red : na, transp=80)
bgcolor(sch2 and crossUp2 ? #33FFFC : na, transp=80)
bgcolor(sch2 and crossDn2 ? orange : na, transp=80)

//plots for Cross with no filter
bgcolor(sac1 and crossUpAll ? lime : na, transp=80)
bgcolor(sac1 and crossDownAll ? red : na, transp=80)
bgcolor(sac2 and crossUpAll2 ? #33FFFC : na, transp=80)
bgcolor(sac2 and crossDownAll2 ? orange : na, transp=80)

//Plot Stoch1
plot(outK, title="Stoch1 K", style=line, linewidth=1, color=lime)
plot(outD, title="Stoch1 D", style=line, linewidth=1, color=red)

// Plot Stoch2
plot(ssStoch and outK2 ? outK2 : na, title="Stoch2 K", style=line, linewidth=1, color=#33FFFC)
plot(ssStoch and outD2 ? outD2 : na, title="Stoch2 D", style=line, linewidth=1, color=orange)


plotchar(sl1 and crossUp ? crossUp : na, title="Strict Buy 1", char='B', location=location.bottom, color=lime, transp=0, offset=0,size=size.auto)
plotchar(sl1 and crossDn ? crossDn : na, title="Strict Sell 1", char='S', location=location.top, color=red, transp=0, offset=0,size=size.auto)
plotchar(sacl1 and crossUpAll ? crossUpAll : na, title="Any Buy 1", char='B', location=location.bottom, color=lime, transp=0, offset=0,size=size.auto)
plotchar(sacl1 and crossDownAll ? crossDownAll : na, title="Any Sell 1", char='S', location=location.top, color=red, transp=0, offset=0,size=size.auto)

plotchar(sl2 and crossUp2 ? crossUp2 : na, title="Strict Buy 2", char='b', location=location.bottom, color=#33FFFC, transp=0, offset=0,size=size.auto)
plotchar(sl2 and crossDn2 ? crossDn2 : na, title="Strict Sell 2", char='s', location=location.top, color=orange, transp=0, offset=0,size=size.auto)
plotchar(sacl2 and crossUpAll2 ? crossUpAll2 : na, title="Any Buy 2", char='b', location=location.bottom, color=#33FFFC, transp=0, offset=0,size=size.auto)
plotchar(sacl2 and crossDownAll2 ? crossDownAll2 : na, title="Any Sell 2", char='s', location=location.top, color=orange, transp=0, offset=0,size=size.auto)



// end
thx for trying to make a multi timeframe stochRSI

but superstoch is not stochRSI but just stoch

i compaired the build-in stochRSI with your indicator and with CM mtf stochastics

your indicator is the same as CM mtf stochastics and not the same as stochRSI on same timeframe

https://gyazo.com/905f0ec89bf169c4ab66c4fd9e3c5cb1
Reply
Quicksilver80 RichardSiegers
5 months ago
You are correct that this is not a Stoch RSI....I was careless when adding the descriptive information. Unfortunately, there is no way to edit the script or description.
Reply
RichardSiegers PRO Quicksilver80
5 months ago
no problem
Reply
RichardSiegers PRO Quicksilver80
5 months ago
im actualy making a mtf stoch-rsi myself now that is based of the already existing mtf stoch from Chris moody

and its works :)

only cleaning it a bit and asking permission from chris moody for publishing and then its ready to go :)

Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out