rstrdview

Soaks Crossing

102 0 6
Triple or quad crossing Just a novice test
Remove from Favorite Scripts Add to Favorite Scripts
study("TO-All")
//study(title="23MA Cross", overlay=true)
short = sma(close, 2)
long = sma(close, 3)
plot(short, color = red)
plot(long, color = green)
plot(cross(short, long) ? short : na, style = cross, linewidth = 4)

//study("50 200 MA Cross",overlay=true)
short2 = sma(close, 50)
long2 = sma(close, 200)
plot(short2, color = orange)
plot(long2, color = black)
plot(cross(short2, long2) ? short2 : na, style = cross, linewidth = 4)

//study(title="Directional Movement Index", shorttitle="DMI")
len = input(5, minval=1, title="DI Length")
lensig = input(13, title="ADX Smoothing", minval=1, maxval=50)
up = change(high)
down = -change(low)
trur = rma(tr, len)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / trur)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / trur)
sum = plus + minus 
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), lensig)
plot(plus, color=red, title="+DI")
plot(minus, color=green, title="-DI")
plot(adx, color=teal, title="ADX")
plot(cross(plus, minus) ? plus : na, style = cross, linewidth = 4)

//study(title="Moving Average Convergence/Divergence", shorttitle="MACD")
source = close
fastLength = input(8, minval=1), slowLength=input(13,minval=1)
signalLength=input(5,minval=1)
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
macd = fastMA - slowMA
signal = sma(macd, signalLength)
hist = macd - signal
plot(hist, color=black, style=histogram)
plot(macd, color=red)
plot(signal, color=green)
plot(cross(macd, signal) ? macd : na, style = cross, linewidth = 4)

//study("TO-StochRSI")
source2 = close
lenRSI = 13, lenStoch = 13, smoothK = 3, smoothD = 5
rsi1 = rsi(source2, lenRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lenStoch), smoothK)
d = sma(k, smoothD)
plot(k, color=blue)
plot(d, color=orange)
cr = cross(k,d)
plot(cross(k,d) ? k : na, style = cross, linewidth = 4)
h0 = hline(80)
h1 = hline(20)
fill(h0, h1, color=purple, transp=80)
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