# SPY VXX RSI crisscross

74 0
// Shows mean of SPY             and VXX             RSI's. While SPY             and VXX             often play "tag",
//crisscrossing each other, the game of tag is either 'down' or 'up'

LIME= SPY             RSI
AQUA=VXX RSI

BLUE= Average of both
Gray= change of blue

The indicator: is the average above or below 50 (are we going up or down).
Reminder - its an RSI 0-100
// Useful in taking hedged positions in Volatility
//Ex. Short VXX             and Long SDS
//Ex. Short XIV             and Long SSO
```// Shows mean of SPY and VXX RSI's. While SPY and VXX often play "tag",
//crisscrossing each other, the game of tag is either 'down' or 'up'

// Useful in taking hedged positions in Volatility
//Ex. Short VXX and Long SDS
//Ex. Short XIV and Long SSO
//

study("SPY VXX RSI crisscross")
m0=input(3,"ema on SPY and VXX")
//m0=input(1,"preema")
m1=input(3,"RSI")
m2=input(3,"ema smooth of RSI")

spy=ema(security("spy" ,"60"  , close ),m0)
vxx=ema(security("vxx" ,"60"  , close ),m0)

s=ema(rsi(spy,m1),m2)
v=ema(rsi(vxx,m1),m2)
a=(v+s)/2
zero=plot(50,color=black,linewidth=1)
ch=plot(change(a)*15+50,color=gray,linewidth=1)
fill(zero,ch,color=gray,transp=75)
plot(s,color=lime,linewidth=1,title='SPY RSI')
plot(v,color=aqua,linewidth=1,title='VXX RSI')
bg = a > 50 ? blue : gray
bgcolor(a > 50 ? red : green, transp=80)
plot(a,color=blue,linewidth=3,title='Mean RSI')

//plot(0,color=black,linewidth=1)
plot(0,color=black,linewidth=1)
plot(100,color=black,linewidth=1)
```
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter